ASP.NET子域重定向 [英] ASP.NET Subdomain Redirect

查看:51
本文介绍了ASP.NET子域重定向的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我有一个asp.net应用程序来管理员工的详细信息。通过单击一个发布详细信息按钮,我想将详细信息复制到子域employee.domainName.com/employeeName/。如何在visual studio中设置此子域以及URL重定向如何?请详细说明。



提前致谢,

Manu v nath

Hi all,
I have an asp.net application to manage employee details. By clicking one 'publish details' button I want to copy details into sub domain 'employee.domainName.com/employeeName/'. How to setup this sub domain in visual studio and how about URL redirect? Please explain in detail.

Thanks in advance,
Manu v nath

推荐答案

http://stackoverflow.com/questions / 2978826 / asp-net-redirect-request-to-a-subdomain-blog-or-www [ ^ ]



可能是这对你们有帮助。
http://stackoverflow.com/questions/2978826/asp-net-redirect-request-to-a-subdomain-blog-or-www[^]

May be this will help you guys.


做这样的事情还有很多工作要做。请参阅 http: //stackoverflow.com/questions/1286831/programatically-create-a-web-site-in-iis-using-c-sharp-and-set-port-number [ ^ ]
There is quite a bit involved to do something like this. Refer to http://stackoverflow.com/questions/1286831/programatically-create-a-web-site-in-iis-using-c-sharp-and-set-port-number[^]


string metabasePath = "IIS://" + server.ComputerName + "/W3SVC";
DirectoryEntry w3svc = new DirectoryEntry(metabasePath, server.Username, server.Password);

string serverBindings = ":80:" + site.HostName;
string homeDirectory = server.WWWRootPath + "\\" + site.FolderName;


object[] newSite = new object[] { site.Name, new object[] { serverBindings }, homeDirectory };

object websiteId = (object)w3svc.Invoke("CreateNewSite", newSite);

// Returns the Website ID from the Metabase
int id = (int)websiteId;









问候,

Praveen





Regards,
Praveen


这篇关于ASP.NET子域重定向的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆