I'm working with a WCF service in Azure, which uses Windows Live ID authentication with the recent deviceid requirements. When I host my WCF service locally in the compute emulator, it works properly, but when I deploy the cloud service to Azure and call it the same way (from another project that uses the WCF service as a service reference), I get the error:
Could not load file or assembly 'Microsoft.IdentityModel, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
I found this post : http://social.msdn.microsoft.com/Forums/en-US/netservices/thread/cd139b5c-ad12-4298-af2f-1b2d0136a977
But there are a few problems:
1. I don't seem to have access to Microsoft.IdentityModel, only System.IdentityModel. I'm not sure why it's searching for something in 3.5 at all, as I'm building in .NET 4.0.
2. When I choose to "copy to local" on System.IdentityModel, it doesn't change anything.
Any help? I would appreciate it!
Best Regards,
Andy
The answer to this question is here: http://social.microsoft.com/Forums/en-US/crm2011beta/thread/951f97df-77b8-4659-8032-6a71161a730c.
The CRM 2011 Beta SDK (versions after Dec. 15th) have some helper code that registers the deviceid on Azure. If you're not working with Microsoft Dynamics CRM 2011, the helper code can still be used to help you see how it's done.
Related
I have a plain .Net based WCF Service which is interacting with SharePoint (2010) Site. I need to deploy it on the Production environment which is not a SharePoint environment. After creating and deploying the solution its giving error
"Could not load file or assembly 'Microsoft.SharePoint.Library, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies. The system cannot find the file specified "
Please help me with the steps to create a deployment package for NON-SharePoint Environment.
Thanks
Yamini
If you are deploying your WCF on non-Sharepoint environment, You cannot use Sharepoint server object model inside wcf.
You need to use Client object model and add reference to Microsoft.Sharepoint.Client and Microsoft.Sharepoint.Client.Runtime
I am trying to host a custom web service in SharePoint 2007 (WSS 3.0) and so far I have followed the instructions here to create a simple 'Hello World' web service: Create WSS Web Service
However, when i get to the virtual path bit in step 4 I am struggling to see in visual studio how I create this and then deploy to make a virtual path to make my web service accessible.
Can anyone help me sort out creating a virtual path for WSS or point me in the direction of another guide to create and host a web service in SharePoint?
Thanks in advance...
You need to register the module in the web.config under configuration/system.web/httpModules.
<add name="ArbitraryName" type="Namespace.ClassName, AssemblyName, Version=1.0.0.0, Culture=neutral, PublicKeyToken=XXXXXXXXXXXXXXX" />
Then you can put it in any directory you'd like. If you're using WSS 3.0 check to see if the previous virtual path provider has a name of "SPVirtualPathProvider". If you're using MOSS 2007 check to see if it has a name of "CmsVirtualPathProvider".
Daniel Larson does a decent job of walking you through it in Chapter 11 in his book Developing Service-Oriented AJAX Applications on the Microsoft Platform.
The best way to do this is normally a FeatureEventReceiver using the SPConfigModification class. This way it pushes out to all the servers in your farm.
You can host a web service in a _layouts folder for example. Just create some folder there (like "MyService"), put your .asmx, then put your web service .dll in GAC (don't use code behind). Restart IIS and you service would be available at http:///_layouts/MyService/.asmx.
I am developing an application based on .Net Framework 3.5 sp1 and hosted on windows server 2008(64bit).
While browsing wcf service (.svc) locally every things is ok but while browsing with full domain URL, it got an error.
local address is like this: http://localhost/MyService.svc
and domain address is like this: http://MySite.ir/MyService.svc
by the way pages (.aspx) and other files work correctly both on localhost and with domain address.
any Idea would be appreciated
Here is detailed error:
HTTP Error 404.3 - Not Found
The page you are requesting cannot be served because of the extension configuration. If the page is a script, add a handler. If the file should be downloaded, add a MIME map.
Detailed Error Information
Module: StaticFileModule
Notification: ExecuteRequestHandler
Handler: StaticFile
Error Code: 0x80070032
Requested URL: http://MySite.ir:80/MyService.svc
Physical Path: D:\inetpub\vhosts\MySite.ir\httpdocs\MyService.svc
Logon Method: Anonymous
Logon User Anonymous
Please make sure you've activated WCF components from here.
Or alternate and easy way is, go to control panel -> Turn Windows feature on or off -> and make sure you've all the options ticked as mentioned in below screenshot.
You might need to activate each box and accept in case you get errors when activating all features at once
OK, here is the answer:
Go to Handler Mappings | Add Handler Manager --> And then add below information
Request Path: *.svc
Type: System.ServiceModel.Activation.HttpHandler, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Name: svc-Integrated
If anyone has this issue on Windows Server 2012, Bill Moon's answer here solved it for me:
"For Windows Server 2012... From the Server Manager, click on Add roles and features, select the appropriate server, then select Features. Under .NET Framework 4.5 Features, you'll see WCF Services, and under that, you'll find HTTP Activation."
I have windows 10 in my laptop and using visual studio 2015 for WCF development. WCF is running fine in visual studio but when hosted in IIS I got the same error.
I checked IIS handler. svc extension was missing. So I tried to add new handler in IIS as suggested by Mori in first answer. I didn't find type "System.ServiceModel.Activation.HttpHandler".
So I opened "Turn windows features On or Off" and installed features as highlighted in screen shot.
This worked for me.
If you're using .Net 4.x, the PublicKeyToken is 31bf3856ad364e35.
However, following this post about installing WCF Services properly in IIS, the handler was set up for me.
I wanted to add this as a comment to the answer but didn't have enough rep for it. I tried running ServiceModelReg and aspnet_regiis.exe with various flags and added HTTP Activation feature but it still didn't work. Even using the Handler mapping UI in IIS didn't work since it could not find System.ServiceModel.Activation.HttpHandler. What finally worked was adding the handler Mori mentions manually to my web.config file.
<system.webServer>
<handlers>
<add name="svc-Integrated" path="*.svc" verb="GET,HEAD,POST,DEBUG" type="System.ServiceModel.Activation.HttpHandler, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" modules="ManagedPipelineHandler" scriptProcessor="" resourceType="Unspecified" requireAccess="Script" allowPathInfo="false" preCondition="integratedMode" responseBufferLimit="4194304" />
My project was running .Net 3.5 and IIS 7.5 on Windows 7 and IIS 7.0 on Win Server 2008 R2.
Try unchecking WCF HTTP activations from "Turn Windows featured on or off" window (See here) and re-install by going to
%windir%\Microsoft.Net\Framework\v3.0\Windows Communication Foundation\
and execute ServiceModelReg -i
Based the article I've tried to start-up the RIA services.
At the moment there are 2 blockers:
On the client side I don't have
<datagrid:DataGrid component. Does
anybody know what namespace contains
this object? (already resolved with
Silverlight Toolkit usage, thanks to
Refracted Paladin for help)
On the
client side I don't have access to
my DomainService... don't know why. Also, I con't see "System.ServiceModel.DomainServices.Client" assembly available to be added to the projects references.
Could anybody help to resolve the 2nd problem?
Thank you.
P.S. I have VS2008, SP1, Silverlight, RIA Services installed.
System.ServiceModel.DomainServices.Client is part of the RIA Services RC for SL4/VS2010. The DLL's for RIA Services RTW for SL3/VS2008 are completely different. And to my knowledge, they can't be installed side-by-side - I have tried.
This article points out some of the differences between the 2 versions, and how to move to RIA Services for SL4/VS2010: http://jeffhandley.com/archive/2010/03/15/contososales-mix10.aspx
If you do end up installing RIA Services for SL4/VS2010, you access the "System.ServiceModel.DomainServices" namespace with a reference to "C:\Program Files\Microsoft SDKs\RIA Services\v1.0\Libraries\Silverlight\System.ServiceModel.DomainServices.Client.dll".
Guess, the problem was in some mistery (my machine has different issues last few days). As a results my ReSharper wasn't able to find the class in a namespace that was not mentioned in the "using" section.
At the moment domain service is accessible on the client side of my Silverlight app. I clicked "Show All Files" for the Silverlight project and found 'Generated_Code' folder that contained all required generated files. In that file full class name is specified, I've used it in my pages and all is workable now.
Thanks to all.
It seems the world is awash with people having problems deploying RIA WCF services, and now I'm one too. I've already tried a bunch of things, but to no avail. I need WCF RIA to support a Silverlight 3 application I've built.
The short story is, using the new WCF RIA services (Nov 09?) I open VS 2008, create new project (silverlight application), enabling ".NET RIA services". Add new item to web project - Linq2SQL dbml file (from SQL 2005 DB prepared earlier) and compile. I add a new item to the web project - domain service (link the tables I need) and compiled. Using the domain context I "Load" data with a standard RIA get query in the MainPage and add a TextBlock to display returned data. Build & run (cassini) - success. Using VS to publish to IIS on local PC - success.
Using VS to publish to test server (IIS6) - browse to location and the Silverlight app loads but Fiddler tells me I've got a 404 on all the the WCF .svc requests. Use Fiddler to "launch IE" on the service request and it's true - 404.
I have already run aspnet_regiis, ServiceModelReg and added mime types for .xap, .xaml, .xbap and .svc. I have included the System.Web.Ria and System.Web.DomainServices DLL with copy local true.
I need help with either
a) a solution
b) an approach to find a solution
I had some troubles with this also, although once I figured them out it's relatively straight forward.
First, run through http://timheuer.com/blog/archive/2009/12/10/tips-to-deploy-ria-services-troubleshoot.aspx (although it seems you have most of that covered off).
Check that you have your DomainServiceModule in the web.config in the new system.webServer bit and the old bit for IIS6:
<httpModules>
<add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add name="DomainServiceModule" type="System.Web.Ria.Services.DomainServiceHttpModule, System.Web.Ria, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
</httpModules>
Finally, I had to create my services manually, by creating .svc files where SL is looking for them (from fiddler) and filling them in with:
<%# ServiceHost Service="NameOfSerice" Factory="System.Web.Ria.DomainServiceHostFactoryEx" %>
Make sure that you also visit the .svc file directly (without the /binary on the end) as you can get some nice errors there (well once you solve your 404 of course!)
HTH,
Jordan.
I fought this issue for a little while myself where it could not find the .svc file. I soon realized it wasn't just my .svc, it was all .svc files. It then appeared to be an IIS6 issue. It turns out that the ASP.NET v4.0x Web Service Extensions are set to "Prohibited" by default. Went into Web Service Extensions config and set ASP.NET v4.0x to "Allowed" and life was all good.
I ran into the same problem. Worked fine with the cassini server under Windows 7. Deployed to Windows Server 2008 R2 with IIS7, and it would not work. Fiddler reported that an 'EndPointNotFoundException' was being thrown.
My solution, since I have full control of the server, was to install Visual Studio 2008 Express, Silverlight 3 SDK, and the WCF RIA Services Beta for VS2008. This meant that the necessary DLLs were already installed in the GAC. I don't think this affected the result, but I turned off 'Copy Local' for the RIA DLLs that were referenced by the Web app.
Probably an unorthodox solution, but it worked for me!!! Actually, I did this at the suggestion of Microsoft Support.
By the way, support for this through Microsoft is very sparse at this time. They are actually trying to figure out right now internally who is going to support this technology: WCF team or Silverlight team. I know it's still in beta, but be warned that a 'GoLive' license doesn't mean its fully supported. I had someone from the WCF team who went out of his way to help me on this, but gave me a disclaimer several times during the call, that it wasn't really supported through those channels yet.
If someone is interested, how to deploy a complete Silverlight solution to IIS with your own batch script, read my answer in this post:
Is there a Management Service (WMSVC) UI in IIS 7 on Windows 7?
I did this, because there was no way, the in-bulit webdeploy feature of VS 2010 was working. The batch script makes it possible, that you can run and debug on IIS.
I know, this is not the explicit answer to this question, but it is a very similar question.
I think you would only use FactoryEx if you extended the Factory as described here. Also, according to my help files, the full name is System.Web.Ria.Services.DomainServiceHostFactory, but the parser can't create that type either, although I have System.Web.Ria in the GAC.
I agree - deploying WCF RIA over https is a challenge - I have yet to get it to work.