WCF hosting
-
Thursday, April 28, 2011 10:47 AM
i creat silverlight webpage with silverlight4 and i used WCF to connect to a database located in a anothe server...in my pc works perfect but after hosting my application in IIS server i can see my page silverlight but i can not see the table of my database! what needs to do?
All Replies
-
Thursday, April 28, 2011 11:38 AM
Most likely it is your WCF service call failed. Check out this blog:
-
Friday, April 29, 2011 6:59 AM
i did exactly what mentioned in this link, i mean
- i change the file "servicereference.clientconfig" to:<endpoint address="../Service1.svc"...>
- And i activat "WCF Activation" in my server wher i host my webpage.
but still can not see the table of my database.
i tryed to view my "service.svc" in the browser and i get this error:
Server Error in '/' Application.
Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS.
Source Error:
Line 17: <compilation debug="true" targetFramework="4.0" /> Line 18: Line 19: <roleManager enabled="true"/> Line 20: Line 21: <authentication mode="Forms">so what you think?
-
Friday, April 29, 2011 9:03 AM
There are actually many places that you have to change from your local server to your host. If do a find on "LCL" you can do a mass update and find them all. The easier/better way is to have two service references, one for your local and for your hosted, then you can just change you "using" statement at the top to switch back and forth
-
Friday, April 29, 2011 9:23 AM
Im still lost
-
Friday, April 29, 2011 11:11 AM
Did you create an Application under IIS or did you just add a Vitural Dirctory? Make sure you add an Application under IIS.
-
Monday, May 02, 2011 3:17 AM
Hello Sladapter,
i added application under IIS and now i get this error message when i browse my webpage:
Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: Unrecognized attribute 'targetFramework'. Note that attribute names are case-sensitive.
Source Error:
Line 15: <add name="DomainServiceModule" type="System.ServiceModel.DomainServices.Hosting.DomainServiceHttpModule, System.ServiceModel.DomainServices.Hosting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> Line 16: </httpModules> Line 17: <compilation debug="true" targetFramework="4.0" /> Line 18: Line 19: <roleManager enabled="true"/>what you think?
-
Monday, May 02, 2011 11:47 AM
Make sure you select ASP.NET v4.0 application pool for this application in the Application Porperty Page.
-
Tuesday, May 03, 2011 5:44 AM
Hi,
Parser Error Message: Unrecognized attribute 'targetFramework'. Note that attribute names are case-sensitive.
Please try this:
1. Opeon IIS
2. Select the site
3. Click the basic settings...
4. Click the "Select" button in the Edit Site dialog.
5. Select the ASP.NET v4.0 option from the Application pool drop down list
6. Click "OK" button -> Click "OK" button (or you can click the "Test Settings" button to check if the setting is fine then click "OK" Button)
If above didn't help, one possiblility is that you installed the .net 4.0 before IIS was set up, so you need to reinstall (register) the .Net framework 4.0, please refer to this:
http://hashbucket.wordpress.com/2010/05/29/just-so-you-know/
Hope this helps.
Regards
-
Tuesday, May 03, 2011 5:50 AM
hi Sladapter,
how i can do select Framework V4.0 for an application pool?
-
Tuesday, May 03, 2011 8:04 AM
Hi,
Thanks guys for your advices...
i use Business silverlight aplication with Silverlight Enabled WCF service to connect to my database.
1-i deployed RIA services as explained in microsoft msdn
2-select .NET Framework v4 for my application
Now im getting this error when i browse my webpage:
Server Error in '/starts' Application.
Could not load file or assembly 'System.ServiceModel.DomainServices.Hosting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.IO.FileNotFoundException: Could not load file or assembly 'System.ServiceModel.DomainServices.Hosting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Assembly Load Trace: The following information can be helpful to determine why the assembly 'System.ServiceModel.DomainServices.Hosting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' could not be loaded.
WRN: Assembly binding logging is turned OFF. To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. Note: There is some performance penalty associated with assembly bind failure logging. To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
Stack Trace:
[FileNotFoundException: Could not load file or assembly 'System.ServiceModel.DomainServices.Hosting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.] System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMarkHandle stackMark, Boolean loadTypeFromPartialName, ObjectHandleOnStack type) +0 System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark, Boolean loadTypeFromPartialName) +95 System.RuntimeType.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark) +54 System.Type.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase) +65 System.Web.Compilation.BuildManager.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase) +69 System.Web.Configuration.ConfigUtil.GetType(String typeName, String propertyName, ConfigurationElement configElement, XmlNode node, Boolean checkAptcaBit, Boolean ignoreCase) +52 [ConfigurationErrorsException: Could not load file or assembly 'System.ServiceModel.DomainServices.Hosting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.] System.Web.Configuration.ConfigUtil.GetType(String typeName, String propertyName, ConfigurationElement configElement, XmlNode node, Boolean checkAptcaBit, Boolean ignoreCase) +360 System.Web.Configuration.ConfigUtil.GetType(String typeName, String propertyName, ConfigurationElement configElement, Boolean checkAptcaBit) +27 System.Web.Configuration.Common.ModulesEntry.SecureGetType(String typeName, String propertyName, ConfigurationElement configElement) +44 System.Web.Configuration.Common.ModulesEntry..ctor(String name, String typeName, String propertyName, ConfigurationElement configElement) +52 System.Web.HttpApplication.BuildIntegratedModuleCollection(List`1 moduleList) +165 System.Web.HttpApplication.GetModuleCollection(IntPtr appContext) +1132 System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +95 System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +194 System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +339 System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +253 [HttpException (0x80004005): Could not load file or assembly 'System.ServiceModel.DomainServices.Hosting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.] System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +8972180 System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +97 System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +256
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.225
Any ideas about?
-
Tuesday, May 03, 2011 8:28 AM
make sure you have added system.servicemodel.domainservices.hosting
after that add this
<system.webServer>
2: <modules runAllManagedModulesForAllRequests="true">
3: <add name="DomainServiceModule" type="System.ServiceModel.DomainServices.Hosting.DomainServiceHttpModule, System.ServiceModel.DomainServices.Hosting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
4: </modules>
5: </system.webServer>
ver
-
Tuesday, May 03, 2011 8:32 AM
1: <system.web>
2: <compilation debug="true" targetFramework="4.0" />
3: <httpModules>
4: <add name="DomainServiceModule" type="System.ServiceModel.DomainServices.Hosting.DomainServiceHttpModule, System.ServiceModel.DomainServices.Hosting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
5: </httpModules>
6: </system.web>
If you are testing you will need this
-
Tuesday, May 03, 2011 8:36 AM
<system.servicemodel>
aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true"/>
</system.servicemodel>
-
Tuesday, May 03, 2011 8:52 AM
-
Tuesday, May 03, 2011 9:03 AM
-
Tuesday, May 03, 2011 9:20 AM
Hi billsm,
thanks fo ryour answer...
i checked all this u asked but still not works

-
Tuesday, May 03, 2011 9:30 AM
Did you install RIA service on your IIS hosting machine? It should be a separate install than .NET 4.
-
Tuesday, May 03, 2011 2:50 PM
I hope you did this also http://support.discountasp.net/KB/a790/how-to-deploy-an-application-built-using-wcf-ria-services.aspx
did you make sure on your webhosts IIS system that only forms authentication is activated
http://www.iis.net/ConfigReference/system.webServer/security/authentication/basicAuthentication here is a little tutorial on that
http://stackoverflow.com/questions/2799637/how-to-access-wcf-ria-service-from-windows-service make sure you have the correct reference !
-
Wednesday, May 04, 2011 7:37 AM
Hi,
Thanks to all guys...no works!
i tryed to browe my service.svc and i get this error:
HTTP Error 500.21 - Internal Server Error Handler "svc-Integrated" has a bad module "ManagedPipelineHandler" in its module list.
then i googling that and i find that i should install .net framework v4.0.30319 with:
aspnet_regiis.exe is located in <WINDIR>\Microsoft.NET\Framework\v4.0.30319\
e.g.: c:\Windows\Microsoft.NET\Framework\v4.0.30319\
In a standard command prompt, cd to that folder and run "aspnet_regiis.exe -i"
Regards to all guys..you are realy gread!
-
Wednesday, May 04, 2011 10:27 PM
Hi,
then i googling that and i find that i should install .net framework v4.0.30319
If you check my previous post, you would find that that's what I was going to tell you.
Anyway, It's glad to know you solve you problem.
Regards

