我一直在构建Silverlight应用程序和WCF服务一段时间,最近试图在IIS7中托管它们。IIS7 + WCF + Silverlight问题
我在Windows Server 2008 R2上安装了IIS7,并将这两个应用程序添加到我的默认网站。我有一些问题,所以我希望你们中的一个人可以帮忙...
1)Silverlight和WCF服务应用程序不能使用传递身份验证。在设置应用程序时,我需要“连接成”管理员服务器帐户。我在网上阅读时,您应该只需要在连接到另一台计算机时使用“connect as”字段。如果我不提供管理员凭据,我得到这个错误。我必须在其他地方设置权限吗?
HTTP Error 500.19 - Internal Server Error The requested page cannot be accessed because the related configuration data for the page is invalid. Detailed Error Information Module IIS Web Core Notification BeginRequest Handler Not yet determined Error Code 0x80070005 Config Error Cannot read configuration file due to insufficient permissions Config File \?\C:\Users\Administrator\Documents\My Dropbox\Research Masters\Project\WCFService\Website\web.config Requested URL http:://localhost:80/WCFService/Service.svc Physical Path C:\Users\Administrator\Documents\My Dropbox\Research Masters\Project\WCFService\Website\Service.svc Logon Method Not yet determined Logon User Not yet determined Config Source -1: 0: Links and More Information This error occurs when there is a problem reading the configuration file for the Web server or Web application. In some cases, the event logs may contain more information about what caused this error.
2)Visual Studio生成2个网页来运行我的Silverlight应用程序(.html和.aspx)。当我运行Silverlight应用程序(以管理员身份连接)时,我可以导航到.html页面,没问题。当我尝试打开.aspx文件我得到以下错误
Server Error in '/Platform' Application.
Access is denied.
Description: An error occurred while accessing the resources required to serve this request. You might not have permission to view the requested resources.
Error message 401.3: You do not have permission to view this directory or page using the credentials you supplied (access denied due to Access Control Lists). Ask the Web server's administrator to give you access to 'C:\Users\Administrator\Documents\My Dropbox\Research Masters\Project\Platform\Website\PlatformTestPage.aspx'.
Version Information: Microsoft .NET Framework Version:4.0.30128; ASP.NET Version:4.0.30128.1
3)WCF服务运行正常(同样,作为连接管理),直到我重新启动服务器。当我尝试在重新启动后运行WCF服务时,似乎从解决方案中缺少了mysql程序集。如果我只是重建解决方案并再次运行该服务......它的工作原理(直到下一次重新启动)。什么导致这个错误?这里
解决方案 - http://tinypic.com/view.php?pic=5yasqx&s=5
Server Error in '/WCFService' Application.
Could not load file or assembly 'MySql.Data, Version=6.2.2.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d' or one of its dependencies. Access is denied.
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.FileLoadException: Could not load file or assembly 'MySql.Data, Version=6.2.2.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d' or one of its dependencies. Access is denied.
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 'MySql.Data, Version=6.2.2.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d' 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:
[FileLoadException: Could not load file or assembly 'MySql.Data, Version=6.2.2.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d' or one of its dependencies. Access is denied.]
System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +0
System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection, Boolean suppressSecurityChecks) +567
System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +192 System.Reflection.Assembly.Load(String assemblyString) +35
System.ServiceModel.Activation.ServiceHostFactory.CreateServiceHost(String constructorString, Uri[] baseAddresses) +243
System.ServiceModel.HostingManager.CreateService(String normalizedVirtualPath) +1423
System.ServiceModel.HostingManager.ActivateService(String normalizedVirtualPath) +50
System.ServiceModel.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath) +1132[ServiceActivationException: The service '/WCFService/Service.svc' cannot be activated due to an exception during compilation. The exception message is: Could not load file or assembly 'MySql.Data, Version=6.2.2.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d' or one of its dependencies. Access is denied..]
System.Runtime.AsyncResult.End(IAsyncResult result) +889824
System.ServiceModel.Activation.HostedHttpRequestAsyncResult.End(IAsyncResult result) +179150
System.Web.AsyncEventExecutionStep.OnAsyncEventCompletion(IAsyncResult ar) +107Version Information: Microsoft .NET Framework Version:4.0.30128; ASP.NET Version:4.0.30128.1
仅此而已,希望有人读这条消息,我浪费了大部分的周末试图解决我自己这些问题...感谢
这是我第一次使用IIS7,所以目前这对我来说都是新的,所以我不知道如何正确设置服务器,我只是在学习。前两个似乎被拒绝访问。我该如何解决? – Eanna 2010-04-04 14:55:35