I have both a dev and prod environment set up on two different virtual directories on the same virtual machine and following Configuring Multiple WMS Instances to try and get them both set up properly. They appear to be working fine as I can see workflow instances being persisted in for the appropriate environments based on the client that is connecting to them. The problem comes in trying to view the persisted instances within IIS Manager. I get the following errors:
IIS Error Displayed when trying to look at persisted instances
Error message presented when clicking on "Error(s) encountered" link
(* I appologize, I don't know how to upload images directly into this post *)
The relevant configuration files I have are as follows:
Default Web.Config
<microsoft.applicationServer>
<monitoring lockElements="bulkCopyProviders, collectors">
<bulkCopyProviders>
<bulkCopyProvider providerName="System.Data.SqlClient" type="Microsoft.ApplicationServer.Monitoring.EventCollector.SqlServerBulkCopy, Microsoft.ApplicationServer.Monitoring, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
</bulkCopyProviders>
<collectors>
<collector name="" session="0">
<settings retryCount="5" eventBufferSize="10000" retryWait="00:00:15" samplingInterval="00:00:05" aggregationEnabled="true" />
</collector>
</collectors>
<default enabled="true" connectionStringName="ProductionApplicationServerMonitoringConnectionString" monitoringLevel="HealthMonitoring" />
</monitoring>
<persistence>
<instanceStoreProviders lockItem="true">
<add name="SqlPersistenceStoreProvider" storeProvider="Microsoft.ApplicationServer.StoreProvider.Sql.SqlWorkflowInstanceStoreProvider, Microsoft.ApplicationServer.StoreProvider, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" storeControlProvider="Microsoft.ApplicationServer.StoreManagement.Sql.Control.SqlInstanceControlProvider, Microsoft.ApplicationServer.StoreManagement, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" storeQueryProvider="Microsoft.ApplicationServer.StoreManagement.Sql.Query.SqlInstanceQueryProvider, Microsoft.ApplicationServer.StoreManagement, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
</instanceStoreProviders>
<workflowManagement>
<workflowManagementServiceInstances lockItem="true">
<workflowManagementServiceInstance name="">
<instanceStores>
<instanceStore name="productionSqlPersistenceStore" location="Workflows.Prod" />
</instanceStores>
</workflowManagementServiceInstance>
<workflowManagementServiceInstance name="Dev">
<instanceStores>
<instanceStore name="devSqlPersistenceStore" location="Workflows.Dev" />
</instanceStores>
</workflowManagementServiceInstance>
</workflowManagementServiceInstances>
</workflowManagement>
<instanceStores>
<add name="devSqlPersistenceStore" provider="SqlPersistenceStoreProvider" connectionStringName="ApplicationServerWorkflowInstanceStoreConnectionString" />
<add name="productionSqlPersistenceStore" provider="SqlPersistenceStoreProvider" connectionStringName="ProductionApplicationServerWorkflowInstanceStoreConnectionString" />
</instanceStores>
</persistence>
<hosting>
<serviceManagement endpointConfiguration="ServiceManagementNetPipeEndpoint" enabled="true" authorizedWindowsGroup="AS_Administrators" />
</hosting>
</microsoft.applicationServer>
<connectionStrings>
<add connectionString="BigSecret" name="ApplicationServerMonitoringConnectionString" />
<add connectionString="BigSecret" name="ApplicationServerWorkflowInstanceStoreConnectionString" />
<add connectionString="BigSecret" name="ProductionApplicationServerMonitoringConnectionString" />
<add connectionString="BigSecret" name="ProductionApplicationServerWorkflowInstanceStoreConnectionString" />
</connectionStrings>
Production Web.Config:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.0" />
</system.web>
<system.serviceModel>
<protocolMapping>
<remove scheme="net.pipe" />
</protocolMapping>
<behaviors>
<serviceBehaviors>
<behavior>
<serviceMetadata httpGetEnabled="false" />
<serviceDebug includeExceptionDetailInFaults="false" />
<sqlWorkflowInstanceStore instanceCompletionAction="DeleteAll" instanceEncodingOption="None" instanceLockedExceptionAction="NoRetry" connectionStringName="ProductionApplicationServerWorkflowInstanceStoreConnectionString" hostLockRenewalPeriod="00:00:30" runnableInstancesDetectionPeriod="00:00:05" />
<workflowInstanceManagement authorizedWindowsGroup="AS_Administrators" />
<workflowUnhandledException action="AbandonAndSuspend" />
<workflowIdle timeToPersist="00:00:00" timeToUnload="00:01:00" />
</behavior>
</serviceBehaviors>
</behaviors>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true" />
</system.webServer>
<microsoft.applicationServer>
<monitoring lockElements="bulkCopyProviders, collectors">
<default enabled="true" connectionStringName="workflowStoreConnectionString" monitoringLevel="HealthMonitoring" />
</monitoring>
<persistence>
<instanceStores>
<remove name="defaultSqlPersistenceStore" />
<add name="defaultSqlPersistenceStore" provider="SqlPersistenceStoreProvider" connectionStringName="workflowStoreConnectionString" />
</instanceStores>
</persistence>
<hosting>
<serviceManagement endpointConfiguration="ServiceManagementNetPipeEndpoint" enabled="false" />
</hosting>
</microsoft.applicationServer>
<connectionStrings>
<add connectionString="BigSecret" name="workflowStoreConnectionString" />
</connectionStrings>
</configuration>
Dev Web.Config - Same as Production but with different connection string
Any help in resolving the error messages and being able to view the persisted instances is appreciated. TIA. JH
Turns out the issue was the result of the msi installer not properly running the sql scripts, failing silently and thus missing some of the tables. Re-running the scripts manually (Create_Persistence_Schema.sql, Create_Persistence_Logic.sql, Create_Monitoring_Schema.sql and Create_Monitoring_Logic.sql located in C:\windows\System32\AppFabric\Schema) corrected the issue.
Related
I am working on an asp.net console application , and i am trying to add a custom app settings section to encrypt it, as follow:-
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<customAppSettingsGroup>
<customAppSettings>
<add key="KeyOne" value="****" />
</customAppSettings>
</customAppSettingsGroup>
<appSettings>
<add key="ConcurrentRequests" value="100" />
<add key="ApiLimit" value="100" />
<add key="FullScanDay" value="Tuesday" />
<add key="logsFilePath" value="C:\logslogs\" />
<add key="TPSFilePathAndName" value="C:\ctps_ns.txt" />
<add key="PhoneNumberLength" value="11" />
</appSettings>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
</startup>
</configuration>
but when i run the console application i will get this error:-
ConfigurationErrorsException: Unrecognized configuration section customAppSettingsGroup.
any advice?
EDIT-
I tried this inside my app.config:-
<configuration>
<configSections>
<sectionGroup name="customAppSettingsGroup">
<section name="customAppSettings"
type="System.Configuration.NameValueSectionHandler,System" />
</sectionGroup>
</configSections>
<customAppSettingsGroup>
<customAppSettings>
<add key="KeyOne" value="****" />
</customAppSettings>
</customAppSettingsGroup>
<appSettings>
<add key="ConcurrentRequests" value="100" />
<add key="ApiLimit" value="100" />
<add key="FullScanDay" value="Tuesday" />
<add key="logsFilePath" value="C:\logslogs\" />
<add key="TPSFilePathAndName" value="C:\ctps_ns.txt" />
<add key="PhoneNumberLength" value="11" />
</appSettings>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
</startup>
</configuration>
but when i try to access the section using this code:-
NameValueCollection settings = ConfigurationManager.GetSection("customAppSettingsGroup/customAppSettings") as System.Collections.Specialized.NameValueCollection;
i got this exception:-
Could not load file or assembly 'System' or one of its dependencies.
The system cannot find the file specified.'
Try it this way
<configuration>
<configSections>
<sectionGroup name="customAppSettingsGroup">
<section name="customAppSettings"
type="System.Configuration.NameValueSectionHandler,System" />
</sectionGroup>
</configSections>
<customAppSettingsGroup>
<customAppSettings>
<add key="KeyOne" value="****" />
</customAppSettings>
</customAppSettingsGroup>
<appSettings>
<add key="ConcurrentRequests" value="100" />
<add key="ApiLimit" value="100" />
<add key="FullScanDay" value="Tuesday" />
<add key="logsFilePath" value="C:\logslogs\" />
<add key="TPSFilePathAndName" value="C:\ctps_ns.txt" />
<add key="PhoneNumberLength" value="11" />
</appSettings>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
</startup>
</configuration>
I am trying to connect to a WCF service over https and i get the following error
An error occurred while making the HTTP request to https://mysite/App/Service/MyService.svc.
This could be due to the fact that the server certificate is not configured properly with HTTP.SYS in the HTTPS case. This could also be caused by a mismatch of the security binding between the client and the server.
Please help me out of this issue. We need to move to prod by weekend.
WCF web.config file:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<configSections><sectionGroup name="businessObjects">
<sectionGroup name="crystalReports">
<section name="rptBuildProvider" type="CrystalDecisions.Shared.RptBuildProviderHandler, CrystalDecisions.Shared, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304, Custom=null" />
</sectionGroup>
</sectionGroup>
</configSections>
<appSettings>
<add key="MyEnv" value="Server01" />
</appSettings>
<system.web>
<compilation debug="true" strict="false" explicit="true" targetFramework="4.0">
<assemblies>
<add assembly="Oracle.DataAccess, Version=2.112.1.0, Culture=neutral, PublicKeyToken=89B483F429C47342" />
<add assembly="CrystalDecisions.CrystalReports.Engine, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304" />
<add assembly="CrystalDecisions.Shared, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304" />
<add assembly="CrystalDecisions.ReportSource, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" />
<add assembly="CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" />
<add assembly="CrystalDecisions.ReportAppServer.ClientDoc, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" />
</assemblies>
<buildProviders><add extension=".rpt" type="CrystalDecisions.Web.Compilation.RptBuildProvider, CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" /></buildProviders>
</compilation>
<customErrors mode="Off" />
<pages>
<namespaces>
<add namespace="System.Runtime.Serialization" />
<add namespace="System.ServiceModel" />
<add namespace="System.ServiceModel.Web" />
</namespaces>
</pages>
</system.web>
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior>
<serviceMetadata httpsGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="true" />
</behavior>
</serviceBehaviors>
</behaviors>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true" />
<defaultDocument>
<files>
<add value="MyService.svc" />
</files>
</defaultDocument>
</system.webServer>
<businessObjects><crystalReports><rptBuildProvider><add embedRptInResource="true" /></rptBuildProvider></crystalReports></businessObjects></configuration>
Web Application web.config file:
<configuration>
<appSettings>
<add key="HelpLoadMode" value="All" />
</appSettings>
<system.web>
<sessionState mode="InProc" timeout="35"></sessionState>
<compilation debug="true" strict="false" explicit="true" targetFramework="4.0">
<assemblies>
<add assembly="System.ServiceModel.Activation, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
</assemblies>
</compilation>
<customErrors mode="Off"></customErrors>
</system.web>
<system.serviceModel>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" aspNetCompatibilityEnabled="true"></serviceHostingEnvironment>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_IReportService" closeTimeout="00:01:00"
openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
maxBufferSize="4194304" maxBufferPoolSize="10485760" maxReceivedMessageSize="4194304"
messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
useDefaultWebProxy="true">
<readerQuotas maxDepth="6400" maxStringContentLength="4194304" maxArrayLength="131072"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<security mode="Transport">
<transport clientCredentialType="None" proxyCredentialType="None" realm="" />
<message clientCredentialType="UserName" algorithmSuite="Default" />
</security>
</binding>
<binding name="BasicHttpBinding_IMyService1" />
</basicHttpBinding>
</bindings>
<client>
<endpoint address="https://mysite/App/Service/MyService.svc" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IMyService"
contract="MyService.IMyService" name="BasicHttpBinding_IMyService" />
</client>
<standardEndpoints>
<webHttpEndpoint>
<standardEndpoint name="" helpEnabled="true" automaticFormatSelectionEnabled="true" />
</webHttpEndpoint>
</standardEndpoints>
</system.serviceModel>
<system.webServer>
<caching>
<profiles>
<add extension=".png" policy="CacheUntilChange" kernelCachePolicy="CacheUntilChange" />
<add extension=".gif" policy="CacheUntilChange" kernelCachePolicy="CacheUntilChange" />
<add extension=".css" policy="CacheUntilChange" kernelCachePolicy="CacheUntilChange" />
<add extension=".js" policy="CacheUntilChange" kernelCachePolicy="CacheUntilChange" />
</profiles>
</caching>
<directoryBrowse enabled="false" />
</system.webServer>
</configuration>
By default, WCF configuration only supports HTTP protocol to expose the service, we need to set up the additional service endpoint in the System.ServiceModel section.
Please consider the below configuration.
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior>
<serviceMetadata httpGetEnabled="true" httpsGetEnabled="true"/>
<serviceDebug includeExceptionDetailInFaults="false"/>
</behavior>
</serviceBehaviors>
</behaviors>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
<protocolMapping>
<add binding="basicHttpsBinding" scheme="https"/>
</protocolMapping>
</system.serviceModel>
Then we specify an https binding in IIS.
After publishing the service in IIS, we add the service reference on the client to generate the client proxy. It would auto-generate the https endpoint.
One thing must be noted is that we should trust the server certificate when calling the service with the HTTPS endpoint on the server-side.
There are two ways to accomplished this.
Use the below code segments before instantiating the client proxy
class.
ServicePointManager.ServerCertificateValidationCallback += delegate
{
return true;
};
Install the server certificate on the client-side Trusted Root
Certification Authorities(certificate store).
Feel free to let me know if the problem still exists.
We've just installed Application Insights on our server.
Everything seems to be working fine, but exceptions thrown on the server is not showing up in the portal.
We're logging exceptions with our custom tool, but we wanted to be able to see them in AI too, especially the unhandled ones.
It's a plain installation of the AI agent, on a Windows Server 2012.
ApplicationInsigts.confg:
<?xml version="1.0" encoding="utf-8"?>
<ApplicationInsights xmlns="http://schemas.microsoft.com/ApplicationInsights/2013/Settings" schemaVersion="2014-05-30">
<!--
Learn more about Application Insights configuration with ApplicationInsights.config here:
http://go.microsoft.com/fwlink/?LinkID=392530
-->
<TelemetryChannel>
<DeveloperMode>false</DeveloperMode>
</TelemetryChannel>
<TelemetryModules>
<Add Type="Microsoft.ApplicationInsights.Tracing.DiagnosticsTelemetryModule, Microsoft.ApplicationInsights" />
<Add Type="Microsoft.ApplicationInsights.Web.RequestTracking.TelemetryModules.WebRequestTrackingTelemetryModule, Microsoft.ApplicationInsights.Web" />
<Add Type="Microsoft.ApplicationInsights.Web.RequestTracking.TelemetryModules.WebExceptionTrackingTelemetryModule, Microsoft.ApplicationInsights.Web" />
<Add Type="Microsoft.ApplicationInsights.Web.RequestTracking.TelemetryModules.WebSessionTrackingTelemetryModule, Microsoft.ApplicationInsights.Web" />
<Add Type="Microsoft.ApplicationInsights.Web.RequestTracking.TelemetryModules.WebUserTrackingTelemetryModule, Microsoft.ApplicationInsights.Web" />
<Add Type="Microsoft.ApplicationInsights.RuntimeTelemetry.RemoteDependencyModule, Microsoft.ApplicationInsights.RuntimeTelemetry" />
<Add Type="Microsoft.ApplicationInsights.RuntimeTelemetry.ApmcModule, Microsoft.ApplicationInsights.RuntimeTelemetry" />
</TelemetryModules>
<ContextInitializers>
<Add Type="Microsoft.ApplicationInsights.Contexts.ComponentContextInitializer, Microsoft.ApplicationInsights" />
<Add Type="Microsoft.ApplicationInsights.Contexts.DeviceContextInitializer, Microsoft.ApplicationInsights" />
<Add Type="Microsoft.ApplicationInsights.Web.AzureRoleEnvironmentContextInitializer, Microsoft.ApplicationInsights.Web" />
</ContextInitializers>
<TelemetryInitializers>
<Add Type="Microsoft.ApplicationInsights.Core.TimestampPropertyInitializer, Microsoft.ApplicationInsights" />
<Add Type="Microsoft.ApplicationInsights.Contexts.NetBiosMachineNameTelemetryInitializer, Microsoft.ApplicationInsights" />
<Add Type="Microsoft.ApplicationInsights.Contexts.OperatingSystemTelemetryInitializer, Microsoft.ApplicationInsights" />
<Add Type="Microsoft.ApplicationInsights.Contexts.ProcessIdTelemetryInitializer, Microsoft.ApplicationInsights" />
<Add Type="Microsoft.ApplicationInsights.Contexts.ProcessNameTelemetryInitializer, Microsoft.ApplicationInsights" />
<Add Type="Microsoft.ApplicationInsights.Contexts.ThreadIdTelemetryInitializer, Microsoft.ApplicationInsights" />
<Add Type="Microsoft.ApplicationInsights.Contexts.ThreadLanguageTelemetryInitializer, Microsoft.ApplicationInsights" />
<Add Type="Microsoft.ApplicationInsights.Web.TelemetryInitializers.WebOperationNameTelemetryInitializer, Microsoft.ApplicationInsights.Web" />
<Add Type="Microsoft.ApplicationInsights.Web.TelemetryInitializers.WebOperationIdTelemetryInitializer, Microsoft.ApplicationInsights.Web" />
</TelemetryInitializers>
<InstrumentationKey>....</InstrumentationKey>
<ResourceID>.....</ResourceID>
<StatusMonitor>0.10.0-build23829</StatusMonitor>
</ApplicationInsights>
There is a blog post that describes what is collected out of the box and what you need to do in other cases: http://blogs.msdn.com/b/visualstudioalm/archive/2014/12/12/application-insights-exception-telemetry.aspx
AI will not see the exceptions that you may have handled in any global exception handlers. I suspect that may be contributing to what you find. If you do use global exception handlers, you could use the TrackException from AI SDK in the handler, that will then send them to AI.
After deploy my ASP.NET 4.5 Web Forms site under IIS7 I got error that didn't have when run from VS2013.
The errors on browsing my site from firebug:
"NetworkError: 404 Not Found - h t t p://wcfjsproxydemo/bundles/modernizr?v=Vd40cG5fYxxjdknf_y9ilK-zi7pnjL35tk9IAsOQgQc1"
modern...sOQgQc1
"NetworkError: 404 Not Found - h t t p://wcfjsproxydemo/Content/css?v=f5ydPh92LWsttS1MEc8JZmFtAgT6RUaer_jy37xBkQs1"
css?v=...7xBkQs1
"NetworkError: 404 Not Found - h t t p://wcfjsproxydemo/bundles/MsAjaxJs?v=J4joXQqg80Lks57qbGfUAfRLic3bXKGafmR6wE4CFtc1"
MsAjax...E4CFtc1
"NetworkError: 404 Not Found - h t t p://wcfjsproxydemo/bundles/WebFormsJs?v=q9E9g87bUDaS624mcBuZsBaM8xn2E5zd-f4FCdIk2cA1"
WebFor...dIk2cA1
TypeError: Sys.WebForms is undefined
...bForms.PageRequestManager._initialize('ctl00$ctl08', 'ctl01', [], [], [], 90, 'c...
wcfjsproxydemo (line 67)
POST http://intext.nav-links.com/util/intexteval.pl?op=eval&x=3&xop=eval&rnum=911043
200 OK
214ms
intext...inks=3& (line 3039)
I see my site without style.
What should I change here in my site?
my web.config
<?xml version="1.0" encoding="utf-8"?>
<!--
For more information on how to configure your ASP.NET application, please visit
http://go.microsoft.com/fwlink/?LinkId=169433
-->
<configuration>
<configSections>
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</configSections>
<connectionStrings>
<add name="DefaultConnection" providerName="System.Data.SqlClient" connectionString="Data Source=(LocalDb)\v11.0;Initial Catalog=aspnet-WCFJSproxyDemo-20130722004707;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\aspnet-WCFJSproxyDemo-20130722004707.mdf" />
</connectionStrings>
<system.web>
<compilation targetFramework="4.5" />
<httpRuntime targetFramework="4.5" />
<pages>
<namespaces>
<add namespace="System.Web.Optimization" />
</namespaces>
<controls><add assembly="Microsoft.AspNet.Web.Optimization.WebForms" namespace="Microsoft.AspNet.Web.Optimization.WebForms" tagPrefix="webopt" /></controls></pages>
<authentication mode="Forms">
<forms loginUrl="~/Account/Login" timeout="2880" defaultUrl="~/" />
</authentication>
<profile defaultProvider="DefaultProfileProvider">
<providers>
<add name="DefaultProfileProvider" type="System.Web.Providers.DefaultProfileProvider, System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" connectionStringName="DefaultConnection" applicationName="/" />
</providers>
</profile>
<membership defaultProvider="DefaultMembershipProvider">
<providers>
<add name="DefaultMembershipProvider" type="System.Web.Providers.DefaultMembershipProvider, System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" connectionStringName="DefaultConnection" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" applicationName="/" />
</providers>
</membership>
<roleManager defaultProvider="DefaultRoleProvider">
<providers>
<add name="DefaultRoleProvider" type="System.Web.Providers.DefaultRoleProvider, System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" connectionStringName="DefaultConnection" applicationName="/" />
</providers>
</roleManager>
<!--
If you are deploying to a cloud environment that has multiple web server instances,
you should change session state mode from "InProc" to "Custom". In addition,
change the connection string named "DefaultConnection" to connect to an instance
of SQL Server (including SQL Azure and SQL Compact) instead of to SQL Server Express.
-->
<sessionState mode="InProc" customProvider="DefaultSessionProvider">
<providers>
<add name="DefaultSessionProvider" type="System.Web.Providers.DefaultSessionStateProvider, System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" connectionStringName="DefaultConnection" />
</providers>
</sessionState>
</system.web>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="DotNetOpenAuth.Core" publicKeyToken="2780ccd10d57b246" />
<bindingRedirect oldVersion="1.0.0.0-4.0.0.0" newVersion="4.1.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="DotNetOpenAuth.AspNet" publicKeyToken="2780ccd10d57b246" />
<bindingRedirect oldVersion="1.0.0.0-4.0.0.0" newVersion="4.1.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" />
</entityFramework>
<system.serviceModel>
<behaviors>
<endpointBehaviors>
<behavior name="WCFJSproxyDemo.Service.WCFJSproxyDemoBehavior">
<enableWebScript />
</behavior>
</endpointBehaviors>
<serviceBehaviors>
<behavior name="">
<serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
</serviceBehaviors>
</behaviors>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
<services>
<service name="WCFJSproxyDemo.Service.DemoWCFService">
<endpoint address="" behaviorConfiguration="WCFJSproxyDemo.Service.WCFJSproxyDemoBehavior" binding="webHttpBinding" contract="WCFJSproxyDemo.Service.IDemoWCFService">
</endpoint>
</service>
</services>
</system.serviceModel>
<system.webServer>
<defaultDocument>
<files>
<remove value="default.aspx" />
<remove value="iisstart.htm" />
<remove value="index.html" />
<remove value="index.htm" />
<remove value="Default.asp" />
<remove value="Default.htm" />
<add value="TestWCFService.aspx" />
</files>
</defaultDocument>
</system.webServer>
</configuration>
I fixed it.
After some hours working in this issue I found a blog with just one think to do:
<modules runAllManagedModulesForAllRequests="true">
<remove name="BundleModule" />
<add name="BundleModule" type="System.Web.Optimization.BundleModule" />
</modules>
Optimization.cs
bundles.Add(new StyleBundle("~/Static/css/stylesheets.css")
.Include(
"~/Static/stylesheets/base.css",
"~/Static/stylesheets/layout.css"
)
);
bundles.Add(new ScriptBundle("~/Static/js/script.js")
.Include("~/Static/js/jquery.refineslide.min.js",
"~/Static/js/script.js"));
Root.Master
<asp:ContentPlaceHolder ID="cssBundle" runat="server">
<%= System.Web.Optimization.Styles.Render("~/Static/css/stylesheets.css") %>
</asp:ContentPlaceHolder>
.
.
.
<asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
<%= System.Web.Optimization.Scripts.Render("~/Static/js/script.js") %>
</asp:ContentPlaceHolder>
In ASP.net forms,
Just you have to change modules in webconfig to the below
<modules runAllManagedModulesForAllRequests="true">
<remove name="BundleModule" />
<add name="BundleModule" type="System.Web.Optimization.BundleModule" />
</modules>
I've got a WCF-based RESTful API (.NET Framework 4.0) which works fine when hosting on IIS 7.0 (Win7) or IIS 6.0 (Server 2003). However, I found a problem hosting the website on IIS 5.1 (Windows XP) which is surprising because I thought 5.1 and 6.0 differ only by the number of hosted websites.
Everything is fine with the following request (the result screenshot):
http://localhost/test/api/OrderService.svc
So I guess I don't have to register any module for handling SVC files or whatsoever.
However, the following request (the result screenshot):
http://localhost/test/api/OrderService.svc/rest/orders?format=json
returns HTTP code 404.
I've checked the event viewer but found nothing.
Again, everything works on IIS 7.0 and IIS 6.0.
Here is the web.config file (some things cut):
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.0">
<assemblies>
<add assembly="System.Web.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
<add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<add assembly="System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</assemblies>
</compilation>
<globalization uiCulture="auto" />
<customErrors mode="Off" />
</system.web>
<system.webServer>
<!--Это приложение определяет конфигурацию в разделе system.web/httpHandlers.
Если есть уверенность, что можно игнорировать эту ошибку, сообщение о ней можно отключить, установив для параметра system.webServer/validation#validateIntegratedModeConfiguration значение false.
Для запуска приложений ASP.NET на сервере IIS 7.0 и более поздних версий предпочтительным является интегрированный режим.-->
<validation validateIntegratedModeConfiguration="false" />
<modules runAllManagedModulesForAllRequests="true">
<remove name="WebDAVModule" />
<add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add name="UrlRoutingModule" type="System.Web.Routing.UrlRoutingModule, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</modules>
<handlers>
<remove name="WebDAV" />
<add name="AddAsmx" verb="*" path="*.asmx" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add name="AppService" verb="*" path="*_AppService.axd" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add name="ScriptResource" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
</handlers>
</system.webServer>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="soapBinding" closeTimeout="00:02:00" hostNameComparisonMode="Exact" maxBufferSize="120000" maxReceivedMessageSize="120000" >
<security mode="Transport" />
</binding>
</basicHttpBinding>
<webHttpBinding>
<binding name="restBinding">
<security mode="Transport" />
</binding>
<!--http://social.msdn.microsoft.com/Forums/en/wcf/thread/845d0bbd-52b4-420f-bf06-793d53ef93ba-->
<!--<binding name="poxBinding">
</binding>-->
</webHttpBinding>
</bindings>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
<standardEndpoints>
<webHttpEndpoint>
<!--
Configure the WCF REST service base address via the global.asax.cs file and the default endpoint
via the attributes on the <standardEndpoint> element below
-->
<standardEndpoint name="XDDF" maxBufferSize="120000" maxReceivedMessageSize="120000" helpEnabled="true" automaticFormatSelectionEnabled="true" />
</webHttpEndpoint>
</standardEndpoints>
<services>
<service behaviorConfiguration="slBehavior" name="WcfServiceLibrary.OrderService">
<endpoint address="soap" binding="basicHttpBinding" name="basicHttpBinding" bindingConfiguration="soapBinding" contract="WcfServiceLibrary.IOrderService" />
<endpoint address="rest" binding="webHttpBinding" bindingConfiguration="restBinding" behaviorConfiguration="restBehavior" contract="WcfServiceLibrary.IOrderService" />
<!--<endpoint address="pox" binding="webHttpBinding" bindingConfiguration="poxBinding" behaviorConfiguration="poxBehavior" contract="WcfServiceLibrary.IOrderService"/>-->
<endpoint address="mex" binding="mexHttpsBinding" name="mexHttpbinding" contract="IMetadataExchange" />
</service>
</services>
<behaviors>
<endpointBehaviors>
<behavior name="restBehavior">
<!--<enableWebScript/>-->
<webHttp />
</behavior>
<!--<behavior name="poxBehavior">
<webHttp />
</behavior>-->
</endpointBehaviors>
<serviceBehaviors>
<behavior name="slBehavior">
<serviceMetadata httpsGetEnabled="true" />
<serviceDebug httpHelpPageEnabled="true" includeExceptionDetailInFaults="true" />
</behavior>
<behavior name="returnFaults" />
<behavior name="">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
</configuration>
Please help. I couldn't find anything that would help.
Doing the following worked for me.
Select Properties of your application on IIS.
Choose Configuration in Virtual Directory tab.
Click Add. Select Executable as aspnet_isapi.dll. (Normally path
to this would be similar to
c:\windows\microsoft.net\framework\v4.0.30319\aspnet_isapi.dll).
Extension as .*
Uncheck "Check that file exists".
Click OK.
I am posting this so that i can help others, since i had the same issue and most of the posts on WCF REST on IIS 5 are old.
There could be a problem with permissions on your App pool for that website / virtual directory , you can try to set that right and try it out.
You can refer this article for more help on this.
http://technicalwizardry.blogspot.in/2013/04/wcf-rest-service-hosted-on-iis-5.html#!/2013/04/wcf-rest-service-hosted-on-iis-5.html