Hi
I have some errors with my code and Im sure they are to do with priviledges but i cant find any information out about them.
I have 3 machines. a desktop, a laptop and a server
desktop - runs visual studio 2005 for a vb.net app and a asp.net web service. The web service lives on the server.
laptop - holds the sql express db that the vb.net app connects to
server - holds the sql server 2005 database that the web service talks to.
The client app reads data from the db on laptop and then uses the web service on the server to update the db on the server.
I cant figure out how to debug the webservice code, but more of that later...
If the webservice uses code like
Dim dbg As New System.IO.StreamWriter("C:\Inetpub\wwwroot\CDService\debug.txt", true)
then the client app returns error of:
System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.UnauthorizedAccessException: Access to the path 'C:\Inetpub\wwwroot\CDService\debug.txt' is denied.
If i remove the debug log writing I then get error of:
System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.NullReferenceException: Object reference not set to an instance of an object.
So then I thought i better try to debug. I compiled the service code as debug, with <compilation debug="true"> in the web.config file.
Now when i say 'debug' it opens IE with URL localhost:2907/Driver.asmx and list the available web methods. When i click on one and enter the parameter needed, IE opens a new window with this error code:
System.Security.SecurityException: Request for the permission of type 'System.Data.SqlClient.SqlClientPermission, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
at System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet)
at System.Security.PermissionSet.Demand()
Can somebody please suggest some ideas of how to make this work? I am suppose to be making changes to the service but need to get it working first. The service was written in vb.net 2003, but ive upgraded to 2005. I can remember debugging in 2003 and it didnt involve browsers opening, it was just like debugging a normal service.
Thanks in advance for any help
Darren
I have some errors with my code and Im sure they are to do with priviledges but i cant find any information out about them.
I have 3 machines. a desktop, a laptop and a server
desktop - runs visual studio 2005 for a vb.net app and a asp.net web service. The web service lives on the server.
laptop - holds the sql express db that the vb.net app connects to
server - holds the sql server 2005 database that the web service talks to.
The client app reads data from the db on laptop and then uses the web service on the server to update the db on the server.
I cant figure out how to debug the webservice code, but more of that later...
If the webservice uses code like
Dim dbg As New System.IO.StreamWriter("C:\Inetpub\wwwroot\CDService\debug.txt", true)
then the client app returns error of:
System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.UnauthorizedAccessException: Access to the path 'C:\Inetpub\wwwroot\CDService\debug.txt' is denied.
If i remove the debug log writing I then get error of:
System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.NullReferenceException: Object reference not set to an instance of an object.
So then I thought i better try to debug. I compiled the service code as debug, with <compilation debug="true"> in the web.config file.
Now when i say 'debug' it opens IE with URL localhost:2907/Driver.asmx and list the available web methods. When i click on one and enter the parameter needed, IE opens a new window with this error code:
System.Security.SecurityException: Request for the permission of type 'System.Data.SqlClient.SqlClientPermission, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
at System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet)
at System.Security.PermissionSet.Demand()
Can somebody please suggest some ideas of how to make this work? I am suppose to be making changes to the service but need to get it working first. The service was written in vb.net 2003, but ive upgraded to 2005. I can remember debugging in 2003 and it didnt involve browsers opening, it was just like debugging a normal service.
Thanks in advance for any help
Darren