I'v created a simple table, one id field and one string field, just named 'test'.
Added a simple screen for this table.
And this is the error:
<p class="heading1">Request Error</p>
< p>The server encountered an error processing the request. See server logs for more details.</p>
Trace give this result:
1 13/12/2012 20:56:16 Client/Scripts/Generated/usercode.js 200 GET View Details 2 13/12/2012 20:56:16 Client/Scripts/Generated/viewModel.js 200 GET View Details 3 13/12/2012 20:56:16 Client/Content/Resources/msls.tmpl.html 200 GET View Details 4 13/12/2012 20:56:16 Client/Content/Resources/Generated/model.json 200 GET View Details 5 13/12/2012 20:56:16 Services/LightSwitchApplication.Application1-Implementation-ApplicationDataDomainService.svc/binary/__Dummy 404 GET View Details 6 13/12/2012 20:56:17 Client/Content/images/ajax-loader.gif 404 GET View Details 7 13/12/2012 20:56:16 Services/Microsoft-LightSwitch-Security-ServerGenerated-Implementation-AuthenticationService.svc/binary/GetAuthenticationInfo 200 GET View Details 8 13/12/2012 20:56:17 ApplicationData.svc/Table1Items 400 GET View Details 9 13/12/2012 20:56:20 Client/Content/images/icons-18-white.png 404 GET View Details
In the eventlog i found this event:
WebHost failed to process a request.
Sender Information: System.ServiceModel.Activation.HostedHttpRequestAsyncResult/35320229
Exception: System.Web.HttpException (0x80004005): The service '/Services/LightSwitchApplication.Application1-Implementation-ApplicationDataDomainService.svc' does not exist. ---> System.ServiceModel.EndpointNotFoundException: The service '/Services/LightSwitchApplication.Application1-Implementation-ApplicationDataDomainService.svc' does not exist.
at System.ServiceModel.ServiceHostingEnvironment.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath, EventTraceActivity eventTraceActivity)
at System.ServiceModel.ServiceHostingEnvironment.EnsureServiceAvailableFast(String relativeVirtualPath, EventTraceActivity eventTraceActivity)
at System.Runtime.AsyncResult.End[TAsyncResult](IAsyncResult result)
at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.End(IAsyncResult result)
Process Name: iisexpress
Process ID: 3336
ThanksThursday, December 13, 2012 8:04 PM
I found my problem.
The dll Microsoft.IdentityModel and Microsoft.IdentityModel.Extensions was missing.
I removed the html client. Tried to install again via webplatform installer, but the setup was hanging forever.
After installing all components one by one, the problem was installing the 'Microsoft Identity foundation sdk". It complains about the 'Microsoft Windows Identity'.
I had to enabled it via 'add/remove programs'. 'Windows Features' and check the 'Windows Identity Framework 3.5'
After that the setup via webplatfomr completed succesful.
What I still like to know if there is a way to find out such problems without trying to install, uninstall,...
If the WEB API is falling, it should be possible to turn on the real error, like the <customErrors mode="Off"/> in the web.config.
Also, the Microsoft.Identity.dll is not used directly in lightswitch app's, but obviously it is needed. Where come those files into the picture?
ThanksFriday, December 14, 2012 6:28 PM
Thanks for the followup! Can you provide some additional details of your experience?
- Can you confirm you are on a Windows 8 machine?
- Did you install the first time using the Web platform installer? If yes, did it succeed this first time through with no reported issues?
Yes, microsoft.identity.* files are used by LS. If you have an existing LS project open in visual studio and change from the "Logical View" to "File View" in the solution explorer, then select the Server project node and turn on "Show All Files". At this point you will see the "References" node and you should see the references to the "identity" assemblies.
Robert Schoen (Microsoft Visual Studio LightSwitch Team)Friday, December 14, 2012 7:16 PM
Indeed I'm working on a Win8 machine.
The first time I installed it one by one because via the web platform it ended in an endless loop (I think because 'Identity Framework 3.5' needs to be installed via add 'windows features').
So, probably I missed one.
I know about the 'file view'. But to be more clear: I was able to compile and run, even with identity framework missing. So, in a html LS project, the identity framework dlls are not used directly.
So, when are those dll's used and by whom?
BartSaturday, December 15, 2012 6:50 AM
Here is some followup info...that may be helpful.
1. Web Platform Installer related - Our WPI feed for installing our client preview 2 bits should have automatically configured your WIF (windows identity framework) components for you by enabling the windows feature (This is specific to a Win8) and then installing the related SDK. Sounds like the "hang" you experienced might have been one of those "connection to server glitch" type things that can occur. Here is a link that may help to investigate further into that original WPI failure - http://forums.iis.net/t/1178550.aspx
2. Regarding the (missing) identity framework dlls that are referenced in the server project - I believe these are specically important for authentication that occurs within Sharepoint enabled projects. if you need further details regarding these dependencies, I can track someone down on the team that can likely answer with more details.
Robert Schoen (Microsoft Visual Studio LightSwitch Team)
Monday, December 17, 2012 5:37 PM
- Proposed as answer by Robert Schoen [MSFT] Monday, December 17, 2012 5:37 PM
Sorry for resurrecting a dead thread. I'm having the same issue and I'm stuck trying to resolve it.
I'm working through the eBay Daily Deals blog post with HTML Client Preview 2. I'm getting this issue on both my laptop and my desktop which are both running Windows 8.
My event log shows the following being raised by System.ServiceModel 188.8.131.52
WebHost failed to process a request. Sender Information: System.ServiceModel.Activation.HostedHttpRequestAsyncResult/45653674 Exception: System.Web.HttpException (0x80004005): The service '/Services/LightSwitchApplication.LightApp-Implementation-EBayDataDataDomainService.svc' does not exist. ---> System.ServiceModel.EndpointNotFoundException: The service '/Services/LightSwitchApplication.LightApp-Implementation-EBayDataDataDomainService.svc' does not exist. at System.ServiceModel.ServiceHostingEnvironment.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath, EventTraceActivity eventTraceActivity) at System.ServiceModel.ServiceHostingEnvironment.EnsureServiceAvailableFast(String relativeVirtualPath, EventTraceActivity eventTraceActivity) at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.HandleRequest() at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.BeginRequest() at System.Runtime.AsyncResult.End[TAsyncResult](IAsyncResult result) at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.End(IAsyncResult result)
Process Name: iisexpress Process ID: 9412
I've checked that I have Windows Identity Foundation 3.5 enabled in Windows Features, and it is.
I can use OData as a data source from the Internet or my LAN, and the SL client seems quite happy with it. If I create a HTML Client using a DB connection to a SQL-Server it also works fine.
Before I tug out what remains of my hair if anybody could offer any advice I'd be grateful
Friday, February 01, 2013 8:26 PM
- Edited by Mr Plastic Friday, February 01, 2013 8:28 PM
Hey Mr. Plastic -
Don't pull out your hair!
Can you clarify something:
-What/where is the ebay daily deals blog post?
I want to try out the same scenario as you if possible
I'm a bit reluctant to offer any words of wisdom right now until I know what I'm talking about :)
R. Matt SampsonMonday, February 04, 2013 5:32 PM
Mr. Plastic -
Your error message that you posted is a bit confusing to me. I'm really not sure what that's about.
But here's what I did:
1) As blog said: I created an app and attached to ODATA source - http://ebayodata.cloudapp.net/
2) Created a screen around Deals, and F5'd
3) I'm getting an exception - which I checked out with the trace.axd (which you can enable through the LS web.config) (I get this with SL client as well)
The exception is about this - we query this odata service using $inlinecount=allpages - which is a standard odata query
This query does not appear to be supported against V1 version of OData.
And the ebayodata.cloudapp.net service does appear to now be V1 (I'm guessing it was different back when this blog was written).
I'm going to follow up with my team about this, but in the meantime you can try other Odata Services available on http://www.Odata.org/producers (under Live Services).
I'll make sure we update the blog as well.
Does this help?
R. Matt SampsonMonday, February 04, 2013 10:02 PM
Let me know if any other ODATA Services give you the same issue.
The exception you see in the event log I understand a bit better now, and have logged an issue on our side.
BUT, that should have no effect in the result as that exception is caught and dealt with fine in the product. I imagine it still gets logged to the event log as well, but it shouldn't affect anything.
R. Matt SampsonWednesday, February 06, 2013 5:48 PM