Re: website in DLL, need to access the code



Greg,

Thanks again, that worked like a charm but I got a tough one for you but I
have faith you'll know a solution.

Again, I am not very familiar with the entire c#/class/DLL structure but
here is what the broken site has:

a bin folder with "genLog.aspx.DLL" in it

an employment folder that has the html for the application that's breaking

and a "genLog" folder that contains the genLog.aspx file (that uses that
bin/genLog.aspx.DLL file).

When I un-DLLed the DLL file, it gave me 3 files including a genLog.cs so
when I re-DLL-ed it, it named it genLog.dll instead of
genLog.aspx.dll........So when I run the application in the web browser I get
this error:

Server Error in '/' Application.
Configuration Error
Description: An error occurred during the processing of a configuration file
required to service this request. Please review the specific error details
below and modify your configuration file appropriately.

Parser Error Message: The located assembly's manifest definition with name
'genLog.aspx' does not match the assembly reference.

Source Error:
Line 256: <add assembly="System.EnterpriseServices,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
Line 257: <add assembly="System.Web.Mobile,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
Line 258: <add assembly="*"/>
Line 259: </assemblies>
Line 260:

Source File:
c:\windows\microsoft.net\framework\v1.1.4322\Config\machine.config Line:
258

Assembly Load Trace: The following information can be helpful to determine
why the assembly 'genLog.aspx' could not be loaded.

=== Pre-bind state information ===
LOG: DisplayName = genLog.aspx
(Partial)
LOG: Appbase = file:///E:/Inetpub/oprs/web
LOG: Initial PrivatePath = bin
Calling assembly : (Unknown).
===

LOG: Policy not being applied to reference at this time (private, custom,
partial, or location-based assembly bind).
LOG: Post-policy reference: genLog.aspx
LOG: Attempting download of new URL
file:///C:/WINDOWS/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET
Files/root/945bae20/d6dbc064/genLog.aspx.DLL.
LOG: Attempting download of new URL
file:///C:/WINDOWS/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET
Files/root/945bae20/d6dbc064/genLog.aspx/genLog.aspx.DLL.
LOG: Attempting download of new URL
file:///E:/Inetpub/oprs/web/bin/genLog.aspx.DLL.
WRN: Comparing the assembly name resulted in the mismatch: NAME

It says something like NAME mismatch....i'm assuming it's the name of the
DLL. I changed it manually (just 'rename') but of course that didn't work.

Any sugestions? Solutions? Thank you again

Karina




--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.2300; ASP.NET
Version:1.1.4322.2300



"Greg Young" wrote:

Add /target:library to csc ... by default it will try to compile as a
windows .exe which requires a Main() entry point.

Cheers,

Greg Young
"Karina" <Karina@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:0A5EC09E-76B6-4A03-9264-C852EC8CBABD@xxxxxxxxxxxxxxxx
Greg,

I want to use the command-line compiler so I did this:

C:\>cd c:\WINDOWS\Microsoft.NET\framework\v1.1.4322

C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322>csc
c:\empAdmin\bin\genLog.aspx_Sou
rce\genLog.cs

and recieved this error:

error CS5001: Program
'c:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\genLog.exe'
does not have an entry point defined

I am using the 1.1 compiler instead of the 2.0 but when I use the 2.0 i
basically get the same error.

Thank you for any help you can provide, Karina




"Greg Young" wrote:

To get it back you would have to put the code into a project and compile
it.
Since it is 1.x you would need to do this in 1.x. You can also build from
the command line (csc or nant etc).

Cheers,

Greg
"Karina" <Karina@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:146EEDE5-2DE3-42E6-9471-8E9D7730BFBF@xxxxxxxxxxxxxxxx
Thank you all! That worked great, I was able to see the source code of
genLog.cs, I changed what was wrong (a static IP address, we moved
servers
and it was hard coded in the dll file). Now I must re-DLL the file. I
tried
using csc.exe but it tried to make an EXE and not a DLL plus it gave an
error
about missing a main in the .cs file.

How do I get it back to a DLL. When I un-DLLed the file, there were 3
files
in total, a CS file, a proj file and a assemblyInfo.cs file. There is
another small issue. The project was written in asp1.1 so when I try
to
open
it in visual studio 2005, it asks to convert, the site is in 1.1 so I
cannot
convert as it might break something else.

I talked to my manager about getting some kind of procedure so that
this
does not happen again.

Thank you again for all the help, I am still learning.
Karina


"Marc Gravell" wrote:

Run reflector; View -> Add-Ins... -> Add...

Drag you web-site dll into reflector; select it;

Tools -> File Disassembler

Good luck (and note: don't expect any comments etc... and pray it
isn't
highly obfuscated)

Marc









.



Relevant Pages

  • Global Assembly Cache Issue
    ... I have a dll that I use in several projects, that I placed in the Global ... you can see in the Exception below). ... If I change the Copy Local property of the reference to True, ... Attempting download of new URL ...
    (microsoft.public.dotnet.framework.aspnet)
  • Cant run DLL
    ... I manually located the dll as the error says and it's not there ... ... The format of the file 'TestCls1' is invalid. ... Policy not being applied to reference at this time (private, ... Attempting download of new URL ...
    (microsoft.public.dotnet.framework)
  • Re: Problems building Pipeline Component Wizard - missing Microsoft.BizTalk.Wizard
    ... I think the DLL is just not included, but I'm sure it will be soon. ... For now, if you want to make the wizard work, download the DLL from ... It won't build because the project reference to Microsoft.BizTalk.Wizard ...
    (microsoft.public.biztalk.general)
  • Help - Configuration Error
    ... code and the DLL files, compiled the application, and when I run it on ... re-added the reference and the project compiled fine.. ... An error occurred during the processing of a configuration ... Attempting download of new URL ...
    (microsoft.public.dotnet.framework.aspnet)
  • >>> DLL DOWNLOAD <<<
    ... download pcsx2 gsdx dll d3d ... download windows dll files ... dll file downloads ...
    (sci.astro)

Loading