1

I'm having a strange issue.

I have a solution targeting the .net 4 framework (EF4 --> WCF4 --> Silverlight 4).

Currently, the ASP.NET web page is in the same project as the WCF service.

I recently started debugging the application, and all was fine. I had to shore up some problems I had with async methods in the service, and delete and rebuild the service reference.

After this, I started getting series of exceptions, starting with System.UnauthorizedAccessException, that I am unable to trap. They occur during the loading of GAC modules; I've had difficulty finding any pattern, because it doesn't always occur.

Let me know what additional information would be useful, as I have no idea.

Many thanks.

4

2 に答える 2

1

The solution to debugging the issue was the following:

  1. In VS2010, go to Debug menu --> Exceptions... --> Check all the boxes (b/c I didn't know any better) and click OK.

  2. Run in Debug mode again.

The app will now break immediately on these pre-runtime errors and you can explore further.

I was able to get there thanks to another another SO question (2014365).

Apparently there's a temporary file I don't have the correct permissions for.

于 2012-05-27T18:26:01.477 に答える
0

You can get this error when try call a service method, which has attribute "[RequiresAuthentication()]", as Unauthorized user, if you use some Authorization Domain Service or etc. More information there: http://msdn.microsoft.com/en-us/library/ee707353(v=vs.91).aspx

于 2012-05-28T08:03:34.573 に答える