简体   繁体   English

ASP.Net Webforms中的URL晦涩

[英]Obscured URL in ASP.Net Webforms

I am working on a ASP.Net web forms application which I inherited from a programmer who has already left the company a few months ago. 我正在一个ASP.Net Web窗体应用程序上工作,该应用程序是我从几个月前离开公司的程序员那里继承而来的。

The application is deployed in our intranet servers and user go the application via the url: 该应用程序已部署在我们的Intranet服务器中,并且用户通过url访问该应用程序:

http://TestApp/App1/(12345abcde)/login.aspx HTTP:// TestApp / App1的/(12345abcde)/login.aspx

When I checked the IIS Server, the application's folder is only set to 当我检查IIS服务器时,应用程序的文件夹仅设置为

\\inetpub\\wwwroot\\TestApp\\App1\\ \\的Inetpub \\ wwwroot的\\ TestApp \\应用1 \\

and from that folder, you could see the login.aspx file. 从该文件夹中,您可以看到login.aspx文件。

I'd like to ask what IIS settings did the previous programmer tweaked so that the URL is a bit obscured, where the imaginary(?) folder named (12345abcde) has been inserted. 我想问一下以前的程序员对哪些IIS设置进行了调整,以使URL有点模糊,其中已插入名为(12345abcde)的虚构(?)文件夹。 Which settings do I need to check for in the IIS for this? 为此,我需要在IIS中检查哪些设置?

Another question is that in the login.aspx file, the following can be found: Codebehind="Login.aspx.vb", but the same file Login.aspx.vb is not on the application's directory. 另一个问题是,在login.aspx文件中,可以找到以下内容:Codebehind =“ Login.aspx.vb”,但是同一文件Login.aspx.vb不在应用程序的目录中。 Although I did see that there is a bin folder where a dll file resides. 虽然我确实看到有一个dll文件所在的bin文件夹。 Is it possible that the vb code behind file is compiled into that DLL? 文件后面的vb代码是否可能编译到该DLL中?

By the way, if there is an available dll viewer which I could download, kindly post the same so that I could inspect the DLL in the webforms app. 顺便说一句,如果有可供下载的dll查看器,请将其发布,以便我可以在webforms应用程序中检查DLL。

Appreciate your inputs. 感谢您的投入。 Thanks. 谢谢。

This comes from using cookieless sessions in ASP.NET. 这来自在ASP.NET中使用无cookie会话

Basically, instead of storing the session id in a cookie, it is passed as part of the URL, which makes the app usable even when cookies are disabled in a browser. 基本上,不是将会话ID存储在cookie中,而是将其作为URL的一部分进行传递,即使在浏览器中禁用cookie时,该应用也可以使用。

To enable/disable this feature, use the following web.config entry: 要启用/禁用此功能,请使用以下web.config条目:

<sessionState cookieless="true" />

Regarding your second question: when you use the "publish web site" function in Visual Studio, all code-behind files are compiled to DLLs (in the bin folder), and the ASPX file are changed to include a reference to the corresponding DLL (in the <@Page > directive). 关于您的第二个问题:在Visual Studio中使用“发布网站”功能时,所有代码隐藏文件都被编译为DLL(在bin文件夹中),并且ASPX文件被更改为包括对相应DLL的引用(在<@Page >指令中)。


And regarding the "dll viewer": have a look at .NET Reflector . 关于“ dll查看器”:看一下.NET Reflector

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM