我们需要能够在同一个Intranet服务器和端口号上运行一个ASP.net Web应用程序的两个版本,但是一个映射到/,另一个映射到/ experimental(不是真实姓名,但足够接近).
C:\ inetpub\wwwroot\Version1 => http://test1.organization.com/ C:\ inetpub\wwwroot\Version2 => http://test1.organization.com/experimental
第一个URL已经暴露给一些beta用户,因此需要保持一定的稳定性.第二个将包含实验代码,只有用户进入/实验将会看到.我们没有使用其他服务器或不同端口的选项.
我以前通过/映射到IIS中的站点下的站点,然后将第二个站点添加为其下的应用程序,并将其别名化为/ site2来实现此目的.
服务器站点默认网站<=物理路径映射到第一个版本和//Application1 <=嵌套应用程序映射到第二个版本和/ experimental
但是,这似乎很草率.使用重写规则或使用ARR执行此操作会更清晰吗?如果是这样,怎么样?
谢谢!
我将实体框架更新为6.0,现在我得到一个我无法弄清楚的例外.
为entityFramework创建配置节处理程序时发生错误:在应用程序配置中多次指定了不变名称"System.Data.SqlClient"的提供程序.对于每个已配置的提供程序,不变名称必须是唯一的.(C:\ inetpub\wwwroot\scrape\Scrape\web.config第106行)
'System.Data.Entity.Internal.AppConfig'的类型初始值设定项引发了异常.
web.config没有列出多次提供者,我只有一个web.config用于整个项目.我很感激任何帮助.
堆栈跟踪
在System.Data.Entity.Internal.AppConfig.get_DefaultInstance()
在System.Data.Entity.Internal.LazyInternalConnection..ctor(String nameOrConnectionString)
在System.Data.Entity.DbContext..ctor(String nameOrConnectionString)
at Scrape.Data.Contexts.ScabsContext..ctor()在c:\ inetpub\wwwroot\scrape\Scrape.Data\Contexts\ScabsContext.cs:第17行
在Scrape.Data.Repositories.ScabStore..ctor()在C:\的Inetpub\wwwroot的\刮\ Scrape.Data \库\ ScabStore.cs:线15
在Scrape.Api.Controllers.ScabsController.get_store()在C:\的Inetpub\wwwroot的\刮\刮\控制器\ ScabsController.cs:线28
at Scrape.Api.Controllers.ScabsController.Post(Scab scab)在c:\ inetpub\wwwroot\scrape\Scrape\Controllers\ScabsController.cs:第52行
在lambda_method(Closure,Object,Object [])
在System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<> c_ DisplayClassc.b _6(Object instance,Object [] methodParameters)
在System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.Execute(Object instance,Object [] arguments)
在System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext,IDictionary`2 arguments,CancellationToken cancellationToken)
还有我的web.config
<configuration>
<configSections>
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
</configSections>
<connectionStrings>
<add name="ScabContext" providerName="System.Data.SqlClient" connectionString="Data Source=bfleming-dev;Initial Catalog=scabs;User ID=scabs_dbo;Password=password" />
<add name="lmsReadWrite" connectionString="Initial Catalog=caV2;Data Source=devsqlnow1.ca-schools.org;Network Library=dbmssocn;User …Run Code Online (Sandbox Code Playgroud) 我正在尝试在我的托管的子文件夹中运行一个小的ASP.NET项目.我的域名是www.gorangligorin.com,但我想在www.gorangligorin.com/testmvc中运行我的应用程序.ASP.NET MVC在顶级运行时没有问题,但在子文件夹中没有运行.
服务器说这个(第58行是红色的):
Line 56: ASP.NET to identify an incoming user.
Line 57: -->
Line 58: <authentication mode="Forms">
Line 59: <forms loginUrl="~/Account/LogOn" timeout="2880" />
Line 60: </authentication>
Run Code Online (Sandbox Code Playgroud)
我该怎么做才能使这个ASP.NET MVC网站有效?这不是托管在我的计算机上,因此我无权访问IIS配置.