开发者

How to call project_2/search.aspx from project_1/login.aspx

My capex project folder contains all the pages for my asp.net/vb.net websit开发者_如何学Goe. I added a login folder for my login.aspx when I needed to support OpenId authentication, but only found c# samples (dotNetAuth), and wasn't up to rewriting the code in vb.net. My login.aspx page works, but response.redirect("search.aspx") returns a 404 - page not found error.

Both capex and login project folders are stored in my solution folder, and the solution compiles. I've also tried; response.redirect("../capex/search.aspx") (HttpException: can't exit above top dir.) response.redirect("~/capex/search.aspx") (404 - page not found) server.transfer("/capex/search.aspx") ( HttpException: error executing child request)

Can anyone recommend a solution, or point me to vb.net code-behind samples of OpenID authentication, or suggest some more ideas I might try?

Thanks in advance, Mark


If you have two separate projects, you must have two separate Web Sites, hosted and run separately, in different subdomain or virtual directory. And to call one from another, you have to use external URL.

Maybe you should consider including the C# part as a compiled DLL into your main application? There are some ways to do it, see here for example.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜