Problem with Sample Project - Rolodex

Problem with Sample Project - Rolodex

Old forum URL: forums.lhotka.net/forums/t/5814.aspx


CyclingFoodmanPA posted on Monday, November 17, 2008

Yes, another problem with the Rolodex sample.  Now, I know I have to read up on Wcf as that is on my list of "important things to learn."  However, I just want to get the sample working soon to start digging into this stuff. 

Now, I put the Rolodex database in SQL as I don't use SQL Express so I changed the connectionStrings in Web.config of the WcfHostWeb project.

I think I have all the references set up correctly as I am not getting errors there.  A couple I referenced to the regular Csla.dll and got an error indicating that it needs to have the Silverlight Csla so I switched my references there.

Here is the error I am getting pertaining to Wcf:

System.ServiceModel.CommunicationException was unhandled by user code
  Message="An error occurred while trying to make a request to URI 'http://localhost:2430/WcfPortal.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. Please see the inner exception for more details."
  StackTrace:
       at System.ServiceModel.AsyncResult.End[TAsyncResult](IAsyncResult result)
       at System.ServiceModel.Channels.ServiceChannel.SendAsyncResult.End(SendAsyncResult 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 Csla.WcfPortal.WcfPortalClient.WcfPortalClientChannel.EndFetch(IAsyncResult result)
       at Csla.WcfPortal.WcfPortalClient.Csla.WcfPortal.IWcfPortal.EndFetch(IAsyncResult result)
       at Csla.WcfPortal.WcfPortalClient.OnEndFetch(IAsyncResult result)
       at System.ServiceModel.ClientBase`1.OnAsyncCallCompleted(IAsyncResult result)
  InnerException: System.Security.SecurityException
       Message=""
       StackTrace:
            at System.Net.AsyncHelper.BeginOnUI(SendOrPostCallback beginMethod, Object state)
            at System.Net.BrowserHttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
            at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelAsyncRequest.CompleteGetResponse(IAsyncResult result)
       InnerException: System.Security.SecurityException
            Message="Security error."
            StackTrace:
                 at System.Net.BrowserHttpWebRequest.InternalEndGetResponse(IAsyncResult asyncResult)
                 at System.Net.BrowserHttpWebRequest.<>c__DisplayClass5.<EndGetResponse>b__4(Object sendState)
                 at System.Net.AsyncHelper.<>c__DisplayClass2.<BeginOnUI>b__0(Object sendState)
            InnerException:

Any help pertaining to this would be most appreciated.  I want to get this figured out and dig into Troelsen's book on Wcf and then dig into Michele Bustamante's book on Wcf and also dig into my AppDev DVD on Silverlight.  Too many toys too little time.

Thanks
Keith

 

 

 

 

 

sergeyb replied on Monday, November 17, 2008

First step is to verify that the service is up and running.  So, once you start the solution, copy http://localhost:2430/WcfPortal.svc into IE and verify that a page comes up without errors.  If it does, there is an error on server side, most likely something with DB.  The easiest way that I found to debug WCF is to add the following to the wcf congi file.  After you run the app again, double click on c:\Traces.svclog and look for errors (they will be in read).

 

    <system.diagnostics>

        <sources>

            <source name="System.ServiceModel"

                    switchValue="Information, ActivityTracing"

                    propagateActivity="true">

                <listeners>

                    <add name="traceListener"

                                                                                                type="System.Diagnostics.XmlWriterTraceListener"

                                                                                                initializeData= "c:\Traces.svclog" />

                </listeners>

            </source>

        </sources>

    </system.diagnostics>

 

 

 

Sergey Barskiy

Principal Consultant

office: 678.405.0687 | mobile: 404.388.1899

cid:_2_0648EA840648E85C001BBCB886257279
Microsoft Worldwide Partner of the Year | Custom Development Solutions, Technical Innovation

 

From: CyclingFoodmanPA [mailto:cslanet@lhotka.net]
Sent: Monday, November 17, 2008 10:01 AM
To: Sergey Barskiy
Subject: [CSLA .NET] Problem with Sample Project - Rolodex

 

Yes, another problem with the Rolodex sample.  Now, I know I have to read up on Wcf as that is on my list of "important things to learn."  However, I just want to get the sample working soon to start digging into this stuff. 

Now, I put the Rolodex database in SQL as I don't use SQL Express so I changed the connectionStrings in Web.config of the WcfHostWeb project.

I think I have all the references set up correctly as I am not getting errors there.  A couple I referenced to the regular Csla.dll and got an error indicating that it needs to have the Silverlight Csla so I switched my references there.

Here is the error I am getting pertaining to Wcf:

System.ServiceModel.CommunicationException was unhandled by user code
  Message="An error occurred while trying to make a request to URI 'http://localhost:2430/WcfPortal.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. Please see the inner exception for more details."
  StackTrace:
       at System.ServiceModel.AsyncResult.End[TAsyncResult](IAsyncResult result)
       at System.ServiceModel.Channels.ServiceChannel.SendAsyncResult.End(SendAsyncResult 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 Csla.WcfPortal.WcfPortalClient.WcfPortalClientChannel.EndFetch(IAsyncResult result)
       at Csla.WcfPortal.WcfPortalClient.Csla.WcfPortal.IWcfPortal.EndFetch(IAsyncResult result)
       at Csla.WcfPortal.WcfPortalClient.OnEndFetch(IAsyncResult result)
       at System.ServiceModel.ClientBase`1.OnAsyncCallCompleted(IAsyncResult result)
  InnerException: System.Security.SecurityException
       Message=""
       StackTrace:
            at System.Net.AsyncHelper.BeginOnUI(SendOrPostCallback beginMethod, Object state)
            at System.Net.BrowserHttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
            at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelAsyncRequest.CompleteGetResponse(IAsyncResult result)
       InnerException: System.Security.SecurityException
            Message="Security error."
            StackTrace:
                 at System.Net.BrowserHttpWebRequest.InternalEndGetResponse(IAsyncResult asyncResult)
                 at System.Net.BrowserHttpWebRequest.<>c__DisplayClass5.<EndGetResponse>b__4(Object sendState)
                 at System.Net.AsyncHelper.<>c__DisplayClass2.<BeginOnUI>b__0(Object sendState)
            InnerException:

Any help pertaining to this would be most appreciated.  I want to get this figured out and dig into Troelsen's book on Wcf and then dig into Michele Bustamante's book on Wcf and also dig into my AppDev DVD on Silverlight.  Too many toys too little time.

Thanks
Keith

 

 

 

 

 



CyclingFoodmanPA replied on Monday, November 17, 2008

Whooaa, this is interesting.  Thanks for info on debugging a Wcf service Sergey.  Any idea what all this means:

<E2ETraceEvent xmlns="http://schemas.microsoft.com/2004/06/E2ETraceEvent">

<System xmlns="http://schemas.microsoft.com/2004/06/windows/eventlog/system">

<EventID>131073</EventID>

<Type>3</Type>

<SubType Name="Information">0</SubType>

<Level>8</Level>

<TimeCreated SystemTime="2008-11-17T15:43:25.5004096Z" />

<Source Name="System.ServiceModel" />

<Correlation ActivityID="{00000000-0000-0000-0000-000000000000}" />

<Execution ProcessName="WebDev.WebServer" ProcessID="2012" ThreadID="2" />

<Channel />

<Computer>GOCEIT</Computer>

</System>

<ApplicationData>

<TraceData>

<DataItem>

<TraceRecord xmlns="http://schemas.microsoft.com/2004/10/E2ETraceEvent/TraceRecord" Severity="Information">

<TraceIdentifier>http://msdn.microsoft.com/en-US/library/System.ServiceModel.Diagnostics.AppDomainUnload.aspx</TraceIdentifier>

<Description>AppDomain unloading.</Description>

<AppDomain>7541cc-2-128714100588579076</AppDomain>

<ExtendedData xmlns="http://schemas.microsoft.com/2006/08/ServiceModel/DictionaryTraceRecord">

<AppDomain.FriendlyName>7541cc-2-128714100588579076</AppDomain.FriendlyName>

<ProcessName>WebDev.WebServer</ProcessName>

<ProcessId>2012</ProcessId>

</ExtendedData>

</TraceRecord>

</DataItem>

</TraceData>

</ApplicationData>

</E2ETraceEvent>

All the red stuff is pertaining to Microsoft and it is a text string.

Thanks,

Keith

sergeyb replied on Monday, November 17, 2008

Not sure about this.  In the left panel you will see a list of events.  I would click on those, starting with the end and look for error.  Entire event should be in red color in the left hand side panel.

 

Sergey Barskiy

Principal Consultant

office: 678.405.0687 | mobile: 404.388.1899

cid:_2_0648EA840648E85C001BBCB886257279
Microsoft Worldwide Partner of the Year | Custom Development Solutions, Technical Innovation

 

From: CyclingFoodmanPA [mailto:cslanet@lhotka.net]
Sent: Monday, November 17, 2008 10:58 AM
To: Sergey Barskiy
Subject: Re: [CSLA .NET] RE: Problem with Sample Project - Rolodex

 

Whooaa, this is interesting.  Thanks for info on debugging a Wcf service Sergey.  Any idea what all this means:

<E2ETraceEvent xmlns="http://schemas.microsoft.com/2004/06/E2ETraceEvent">

<System xmlns="http://schemas.microsoft.com/2004/06/windows/eventlog/system">

<EventID>131073</EventID>

<Type>3</Type>

<SubType Name="Information">0</SubType>

<Level>8</Level>

<TimeCreated SystemTime="2008-11-17T15:43:25.5004096Z" />

<Source Name="System.ServiceModel" />

<Correlation ActivityID="{00000000-0000-0000-0000-000000000000}" />

<Execution ProcessName="WebDev.WebServer" ProcessID="2012" ThreadID="2" />

<Channel />

<Computer>GOCEIT</Computer>

</System>

<ApplicationData>

<TraceData>

<DataItem>

<TraceRecord xmlns="http://schemas.microsoft.com/2004/10/E2ETraceEvent/TraceRecord" Severity="Information">

<TraceIdentifier>http://msdn.microsoft.com/en-US/library/System.ServiceModel.Diagnostics.AppDomainUnload.aspx</TraceIdentifier>

<Description>AppDomain unloading.</Description>

<AppDomain>7541cc-2-128714100588579076</AppDomain>

<ExtendedData xmlns="http://schemas.microsoft.com/2006/08/ServiceModel/DictionaryTraceRecord">

<AppDomain.FriendlyName>7541cc-2-128714100588579076</AppDomain.FriendlyName>

<ProcessName>WebDev.WebServer</ProcessName>

<ProcessId>2012</ProcessId>

</ExtendedData>

</TraceRecord>

</DataItem>

</TraceData>

</ApplicationData>

</E2ETraceEvent>

All the red stuff is pertaining to Microsoft and it is a text string.

Thanks,

Keith



CyclingFoodmanPA replied on Monday, November 17, 2008

Hmm, I am baffeled: For Activity there are all zeroes, for # traces there is a 1, Duration 0 ms, Start and end at 11:18:44 AM as I ran it again.  Ok, time to read up on Wcf and attack this again.  Not sure what I am missing as I usually get the ProjectTracker apps up and running in no time after a download.  After more reading and knowledge absorption, I will attack Rolodex again!

Thanks for your help Surgey, I will be back!

Keith

 

Copyright (c) Marimer LLC