[英]500 Internal Server Error while inserting to Windows Azure Mobile Services?
[英]500 - Internal Server Error, Windows Azure Cloud Service
我刚刚从WCF服务切换到Windows Azure云服务。 我已将代码从WCF服务复制到Cloud服务中。 当我运行网站时,我得到
500内部服务器错误。 您正在寻找的资源有问题,无法显示。
这是我的Web.config代码:
<?xml version="1.0"?>
<configuration>
<connectionStrings>
<add name="PCSDB" connectionString="Data Source=vlnucbukr8.database.windows.net;Initial Catalog=PCSDB;User ID=ProjectPublicLogin;Password=****" providerName="System.Data.SqlClient" />
</connectionStrings>
<configSections>
</configSections>
<system.diagnostics>
<trace>
<listeners>
<add type="Microsoft.WindowsAzure.Diagnostics.DiagnosticMonitorTraceListener, Microsoft.WindowsAzure.Diagnostics, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"name="AzureDiagnostics">
<filter type="" />
</add>
</listeners>
</trace>
</system.diagnostics>
<system.web>
<compilation debug="true" targetFramework="4.0" />
<customErrors mode="Off"/>
</system.web>
<system.serviceModel>
<services>
<service name ="WCFServiceWebRole1.AllocationService">
<endpoint address="" behaviorConfiguration="AllocationBehavior" binding="webHttpBinding" bindingConfiguration="" contract="WCFServiceWebRole1.IAllocationService">
</endpoint>
<host>
<baseAddresses>
<add baseAddress="http://localhost/allocationservice"/>
</baseAddresses>
</host>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior>
<serviceDebug includeExceptionDetailInFaults="false"/>
</behavior>
</serviceBehaviors>
<endpointBehaviors>
<behavior name="AllocationBehavior">
<webHttp/>
</behavior>
</endpointBehaviors>
</behaviors>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
</system.serviceModel>
<system.webServer>
<validation validateIntegratedModeConfiguration="false"/>
<modules runAllManagedModulesForAllRequests="true"/>
<httpErrors>
<remove statusCode="500" subStatusCode="100" />
<error statusCode="500" subStatusCode="100" prefixLanguageFilePath="" path="/errors.asp" responseMode="ExecuteURL" />
</httpErrors>
</system.webServer>
</configuration>
找到了解决方案。
<configSections> </configSections>
必须是
<configuration>
标签
与其将整个代码从服务复制到云程序,不如在解决方案中添加一个Cloud项目,然后右键单击角色并从解决方案中添加现有角色。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.