2009-02-10 91 views
1

我有一个奇怪的场景:的Sharepoint SSL的Web.Config访问问题

我有一个调用的GAC,这是试图读取web.config文件一节DLL中的web部件。 这可以正常工作,但在SSL下失败,称它无法访问(配置文件的)路径。但是,它位于mosssvc帐户下,可以完全控制webconfig文件。

80 web.config文件和443 web.config文件都有相同的条目DLL正在寻找,并且mosssvc有两个配置的完全控制。

我已经尝试将443上的信任级别提升为完整级别,但没有奏效。

任何想法,或任何你能想到的,我可以尝试吗?

编辑:我应该已经更清楚了:SSL站点已经创建并且工作正常,直到GAC'd程序集中的一个方法尝试检查Web配置。

完整的错误信息是:

Event Type:  Warning 
Event Source: ASP.NET 2.0.50727.0 
Event Category:    Web Event 
Event ID:    1310 
Date:      2/9/2009 
Time:      1:44:49 PM 
User:      N/A 
Computer:   XXXXX 
Description: 
Event code: 3008 
Event message: A configuration error has occurred. 
Event time: 2/9/2009 1:44:49 PM 
Event time (UTC): 2/9/2009 9:44:49 PM 
Event ID: 2d7180cdfbb34acfa6c61f95df12ddde 
Event sequence: 26 
Event occurrence: 1 
Event detail code: 0 

Application information: 
    Application domain: YYYYYYYYYYYYYYYYYYYYYYY 
    Trust level: Full 
    Application Virtual Path:/
    Application Path: C:\Inetpub\wwwroot\wss\VirtualDirectories\8443\ 
    Machine name: XXXXXXXX 

Process information: 
    Process ID: 5168 
    Process name: w3wp.exe 
    Account name: XXXXXXXXX\mosssvc 

Exception information: 
    Exception type: ConfigurationErrorsException 
    Exception message: An error occurred loading a configuration file: Access to the path 'C:\Inetpub\wwwroot\wss\VirtualDirectories\8443\web.config' is denied. (C:\Inetpub\wwwroot\wss\VirtualDirectories\8443\web.config) 

Request information: 
    Request URL: https://XXXXXXX:443/training/Pages/smartregister.aspx?c=383 
    Request path: /training/Pages/smartregister.aspx 
    User host address: 64.34.27.186 
    User: 
    Is authenticated: False 
    Authentication Type: 
    Thread account name: XXXXXXX\mosssvc 

Thread information: 
    Thread ID: 10 
    Thread account name: XXXXXXX\mosssvc 
    Is impersonating: True 
    Stack trace: at System.Configuration.ConfigurationSchemaErrors.ThrowIfErrors(Boolean ignoreLocal) 
    at System.Configuration.BaseConfigurationRecord.ThrowIfParseErrors(ConfigurationSchemaErrors schemaErrors) 
    at System.Configuration.Configuration..ctor(String locationSubPath, Type typeConfigHost, Object[] hostInitConfigurationParams) 
    at System.Configuration.Internal.InternalConfigConfigurationFactory.System.Configuration.Internal.IInternalConfigConfigurationFactory.Create(Type typeConfigHost, Object[] hostInitConfigurationParams) 
    at System.Web.Configuration.WebConfigurationHost.OpenConfiguration(WebLevel webLevel, ConfigurationFileMap fileMap, VirtualPath path, String site, String locationSubPath, String server, String userName, String password, IntPtr tokenHandle) 
    at System.Web.Configuration.WebConfigurationManager.OpenWebConfigurationImpl(WebLevel webLevel, ConfigurationFileMap fileMap, String path, String site, String locationSubPath, String server, String userName, String password, IntPtr userToken) 
    at System.Web.Configuration.WebConfigurationManager.OpenWebConfiguration(String path) 
    at XXXXXXXXX.RegistrationHelper.RegisterStudents(Boolean sendEmail, String Time, String Title, String bFirstName, String bLastName, String bAddress, String bPostalCode, String bCity, String bTelephone, String bCompany, String bEmail, List`1 Registrants, Int32 courseDateID, String pType, String CCNumber_, String NameOnCard, String cExpiry, Double Discount, String DiscountCode, Double CostPerRegistrant, String PurchaseOrder) 
    at ASP.SmartEventRegistration.lnkSubmit_Click(Object sender, EventArgs e) in c:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\CONTROLTEMPLATES\SmartEventRegistration\SmartEventRegistration.ascx:line 401 
    at System.Web.UI.WebControls.LinkButton.OnClick(EventArgs e) 
    at System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument) 
    at System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) 
    at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) 
    at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) 
    at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) 
    at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) 
    at System.Web.UI.Page.ProcessRequest() 
    at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) 
    at System.Web.UI.Page.ProcessRequest(HttpContext context) 
    at Microsoft.SharePoint.Publishing.TemplateRedirectionPage.ProcessRequest(HttpContext context) 
    at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() 
    at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) 

回答

1

试试这个,就如何在MOSS启用SSL形式Faranz Kan SharePoint blog

  1. 进入中央管理 - >创建或扩展新网页应用程序 - > 创建一个新的Web应用程序。
  2. 照常填写Web应用程序,数据库和应用程序池名称。选择是以 在Web应用程序上启用SSL。如果 您对此 网络应用程序使用主机标头,则也请输入这些标头。 (重要提示:请务必将端口 设置为443而不是80)。
  3. 创建Web应用程序后,重置IIS,然后打开 IIS mmc。滚动到IIS网站 是MOSS只是为您创建和 从 选择合适的SSL证书的可用证书(请向您 网络乡亲产生内部 或外部的SSL证书您这是否是一个测试或根据 为prod 服务器)。重要提示:转到主页 “目录”选项卡,然后单击“高级”。设定 确定您设置了主机标头和 对于端口80的正确IP。对于SSL条目, 选择端口443和IP。 (如果您的服务器上有多个IP,则 通常会在这里为这些 条目选择一个)。点击 SSL条目的编辑按钮并检查'需要 SSL'框。同时检查'要求128位 加密',以使其更安全。
  4. 现在继续并为此Web应用程序创建您的第一个网站集。 MOSS 将自动为您创建一个新网站 集合,并在 完成时向您显示带有“https:// ..”链接的 。您现在应该有一个SSL 准备好的Web应用程序。
  5. 默认情况下,如果你想使用同一台服务器上的多个SSL web应用程序
    • 如果你想多个MOSS 2007 Web应用程序是启用SSL ,有两种方式,这并不在IIS 6工作 这样做。一种方法是获得许多IP,因为您需要SSL Web应用程序 该Web服务器并分配一个IP每个 主机标头设置的端口80和 443在IIS网站属性 - > 主目录 - >高级。其他 选项是修改IIS元数据库 以允许多个SSL Web应用程序在同一个IP上的 。要小心第二个 选项,并确保你知道你在做什么 。