D
DearManasi
Hi,
I have written a ASP.NET web service . It contains a method called
WriteMessage(). This method creates a .txt file on c drive and writes
some message to it.
Now I have created a ASP.NET web application. I am calling the
WriteMessage() method from this web application. But it is throwing
UnauthorizedAccessException.
The exception is as follows
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
System.UnauthorizedAccessException: Access to the path
'c:\NSWebService.txt' is denied.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess
access, Int32 rights, Boolean useRights, FileShare share, Int32
bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String
msgPath, Boolean bFromProxy)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess
access, FileShare share, Int32 bufferSize, FileOptions options)
at Service.WriteMessage()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
What should I do to obtain the nexessary permissions?
Please help.
Mana
I have written a ASP.NET web service . It contains a method called
WriteMessage(). This method creates a .txt file on c drive and writes
some message to it.
Now I have created a ASP.NET web application. I am calling the
WriteMessage() method from this web application. But it is throwing
UnauthorizedAccessException.
The exception is as follows
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
System.UnauthorizedAccessException: Access to the path
'c:\NSWebService.txt' is denied.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess
access, Int32 rights, Boolean useRights, FileShare share, Int32
bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String
msgPath, Boolean bFromProxy)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess
access, FileShare share, Int32 bufferSize, FileOptions options)
at Service.WriteMessage()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
What should I do to obtain the nexessary permissions?
Please help.
Mana