我已经读过applicationhost.config文件设置默认值,root下面的所有目录都继承这些设置.
我知道可以更改web.config中的defaultdirectory,但我似乎无法对虚拟目录执行相同的操作.
任何指针,帮助表示赞赏.
注意:下面的WEB.CONFIG文件不起作用......只是在那里解释我想要的.
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.web>
<customErrors mode="Off" />
<compilation debug="false" targetFramework="4.0" />
</system.web>
<system.webServer>
<httpErrors errorMode="Detailed" existingResponse="Auto"/>
<asp scriptErrorSentToBrowser="true"/>
<directoryBrowse enabled="false" />
<defaultDocument>
<files>
<clear />
<add value="Default.aspx" />
<add value="default.html" />
</files>
</defaultDocument>
<httpProtocol>
<customHeaders>
<clear />
</customHeaders>
</httpProtocol>
</system.webServer>
<system.applicationHost>
<sites>
<site name="wed" id="1" serverAutoStart="true">
<application path="/alpha-beta">
<virtualDirectory path="/" physicalPath="\url.com\wwwroot\alpha\beta" />
</application>
</site>
<applicationDefaults applicationPool="DefaultAppPool" />
<virtualDirectoryDefaults allowSubDirConfig="true" />
</sites>
</system.applicationHost>
</configuration>
Run Code Online (Sandbox Code Playgroud) 我正在寻找可以帮助我解决一个独特问题的信息,方法或代码.我的第一个想法是使用iframe,但这似乎是在创建跨站点共享的可能问题.
我有一个网站(https://siteB.com),我想"嵌入"其他网站.它是用ASP.net编写的,使用会话变量,登录安全性,向社交媒体(FB,Twitter)发布消息等.任何社交媒体或电子邮件的链接,回发到siteB.com.
客户网站将是(http(s):// siteA.com).它们是非营利性网站,使用支付网关进行信用卡交易.由于交易的性质(税务目的),信用卡费用必须在siteA.com上管理 - siteB.com无法收集资金(对于这种情况),它不能是"直通"类型的交易.
所有用户的流程是访问siteA.com,使用嵌入式siteB.com中的服务,并使用信用卡进行siteA.com交易.siteB.com是工作完成的地方,但付款应该转移到siteA.com.总体而言,我们的目标是在siteA.com上为用户创建无缝体验,并将他们的卡交易发送到siteA.com.
iframe的问题:
欢迎任何建议,非常感谢.