This project is read-only.

Cross domain policy, browser security error? please help

Sep 30, 2010 at 11:50 PM

System.ServiceModel.CommunicationException was unhandled by user code
  Message=An error occurred while trying to make a request to URI 'http://localhost/HappyNet/Services/LoggingService.svc'. This could be due to attempting to access a service in a cross-domain way without a proper cross-domain policy in place, or a policy that is unsuitable for SOAP services. You may need to contact the owner of the service to publish a cross-domain policy file and to ensure it allows SOAP-related HTTP headers to be sent. This error may also be caused by using internal types in the web service proxy without using the InternalsVisibleToAttribute attribute. Please see the inner exception for more details.
       at System.ServiceModel.AsyncResult.End[TAsyncResult](IAsyncResult result)
       at System.ServiceModel.Channels.ServiceChannel.EndCall(String action, Object[] outs, IAsyncResult result)
       at System.ServiceModel.ClientBase`1.ChannelBase`1.EndInvoke(String methodName, Object[] args, IAsyncResult result)
       at Soat.HappyNet.Silverlight.Modules.Logging.LoggingServiceReference.LoggingServiceClient.LoggingServiceClientChannel.EndWriteMessage(IAsyncResult result)
       at Soat.HappyNet.Silverlight.Modules.Logging.LoggingServiceReference.LoggingServiceClient.Soat.HappyNet.Silverlight.Modules.Logging.LoggingServiceReference.ILoggingService.EndWriteMessage(IAsyncResult result)
       at Soat.HappyNet.Silverlight.Modules.Logging.LoggingServiceReference.LoggingServiceClient.OnEndWriteMessage(IAsyncResult result)
       at System.ServiceModel.ClientBase`1.OnAsyncCallCompleted(IAsyncResult result)
  InnerException: System.Security.SecurityException
            at System.Net.Browser.AsyncHelper.BeginOnUI(SendOrPostCallback beginMethod, Object state)
            at System.Net.Browser.ClientHttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
            at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelAsyncRequest.CompleteGetResponse(IAsyncResult result)
       InnerException: System.Security.SecurityException
            Message=Security error.
                 at System.Net.Browser.ClientHttpWebRequest.InternalEndGetResponse(IAsyncResult asyncResult)
                 at System.Net.Browser.ClientHttpWebRequest.<>c__DisplayClass5.<EndGetResponse>b__4(Object sendState)
                 at System.Net.Browser.AsyncHelper.<>c__DisplayClass2.<BeginOnUI>b__0(Object sendState)

Oct 1, 2010 at 8:51 AM

That's weird. Is that occuring only for LoggingService ?

Have you tried typing http://localhost/HappyNet/Services/LoggingService.svc in your browser ? Is it ok ?

Oct 1, 2010 at 2:48 PM
Edited Oct 1, 2010 at 2:52 PM

I traced down the error till the logging service. But, it also seems to be the first service to be used - so, its hard to tell.

Step 1: I am checking to see if my db installation was wrong, so I have uninstalled it and going to re-install it under NT auth mode. Hopefully that will give it the permissions based on the machine.

Here are the db specs - I pulled the latest 2008 R4 version, is this is the correct version you want me to install, because I see an older R2 versions from before.

Besides running the script, do I have to configure anything in the web.config?

Can you give me some steps on the DB side - I think this might be the problem.


Step 2: I also checked to see if the svc was working, but I got an error

Server Error in '/' Application.

The resource cannot be found.

Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable.  Please review the following URL and make sure that it is spelled correctly.

Requested URL: /HappyNet/Services/LoggingService.svc

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1

<!-- [EndpointNotFoundException]: The service '/HappyNet/Services/LoggingService.svc' does not exist. at System.ServiceModel.ServiceHostingEnvironment.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath) at System.ServiceModel.ServiceHostingEnvironment.EnsureServiceAvailableFast(String relativeVirtualPath) at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.HandleRequest() at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.BeginRequest() [HttpException]: The service '/HappyNet/Services/LoggingService.svc' does not exist. at System.Runtime.AsyncResult.End[TAsyncResult](IAsyncResult result) at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.End(IAsyncResult result) at System.Web.HttpApplication.AsyncEventExecutionStep.OnAsyncEventCompletion(IAsyncResult ar) -->

What do I have to do to configure the logging services?



Great app, great work - I cant wait to get it working!!

Apr 1, 2011 at 5:26 PM

Start->All Programs->Visual Studio->Visual Studio Tools->Visual Studio Command Prompt,run ” ServiceModelReg.exe -ia”