views:

85

answers:

3

Given the path of an aspx page on my site that's been precompiled, how can get the path to compiled version (dll or other) from a second page on my site so that I can examine its properties, methods and classes via reflection?

Or some other way to generate method/property lists from aspx pages?

+1  A: 

What your looking for should be in the bin folder of your server. You can't access the bin folder through your browser due to security issues. So you will need to open your server's ISS folder with either a ftp client or from the server locally. Then you can use a reflector against it once you download it.

Lance Ingle
A: 

I believe that they should both be in the same assembly. You can test this out.

Just drop the following snippet at the top of your aspx page:

<%=this.GetType().Assembly.Location %>

This will give you the directory of the dll. Alternatively, you could do this:

<%=typeof(MyWebsite.TargetPageType).Assembly.Location %>

substituting the type of the page you're wanting to examine.

Will
A: 

You could probably use this System.Web.Compilation.BuildManager.GetCompiledType(Me.Request.Url.AbsolutePath)

BK