locked
Strong Naming an Assembly of a web site RRS feed

  • Question

  • User-1256387515 posted

    Has anyone done this: Strong Named Their Assembly. I've read on-line and in the help files for 6 hours straight and I am no where closer to getting this. It seems that every 6 months I run up against one of these types of things with <acronym title="Visual Basic">VB</acronym>.net and the .Net Framework. I read on line and find dozens of people who get the same exact error. Most of the threads are never resolved and the ones that seem to resolve the issue do it in a way that doesn't work for ever one else. It is really absurd.

    My web site runs fine in debug mode on my computer (local host). It loads in FireFox and runs fine. When I post it to my web site I get the error below. I try to "Strong Name The Assembly" with the command line command "aspnet_compiler -v \default.aspx X:\NetProjects\HumMPI -keyfile X:\NetProjects\HumMPI\keypair.snk -aptca"

    \Default.aspx is what fails. This should be the virtual folder of my web app. Obviously "\Default.aspx" is not right. I have tried 42 variations on what I think the virtual path to my web app might be. Every single time the compiler fails telling me that it is not a valid path. 

    I'm moving in to week two of trying to get a simple "Hello world" web app to load on my web site. It runs perfect on my development machine but generates constant errors on the web site. Each time I fix a problem that only happens on the web site another one crops up with even the slightest change - or sometimes even NO change to the code.


    Quote:
    [SecurityException: That assembly does not allow partially trusted callers.]
    _Default.form1_Load(Object sender, EventArgs e) +0
    System.Web.UI.Control.OnLoad(EventArgs e) +99
    System.Web.UI.Control.LoadRecursive() +50
    System.Web.UI.Control.LoadRecursive() +141
    System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +6785
    System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +242
    System.Web.UI.Page.ProcessRequest() +80
    System.Web.UI.Page.ProcessRequestWithNoAssert(Http Context context) +21
    System.Web.UI.Page.ProcessRequest(HttpContext context) +49
    ASP.default_aspx.ProcessRequest(HttpContext context) +37
    System.Web.CallHandlerExecutionStep.System.Web.Htt pApplication.IExecutionStep.Execute() +181
    System.Web.HttpApplication.ExecuteStep(IExecutionS tep step, Boolean& completedSynchronously) +75



    Sunday, January 24, 2010 4:51 PM

All replies

  • User-1256387515 posted

    Here is another odd thing: There is a block of text {Below} associated with the error message above. Both of those debug directives are set. I have built and re-built and published and re-published and it always says the same thing. Below that is a screen shot of when I publish,


    The source code that generated this unhandled exception can only be shown when compiled in debug mode. To enable this, please follow one of the below steps, then request the URL:

    1. Add a "Debug=true" directive at the top of the file that generated the error. Example:

      <%@ Page Language="C#" Debug="true" %>

    or:

    2) Add the following section to the configuration file of your application:

    <configuration>
       <system.web>
           <compilation debug="true"/>
       </system.web>
    </configuration>

    Note that this second technique will cause all files within a given application to be compiled in debug mode. The first technique will cause only that particular file to be compiled in debug mode.

    Important: Running applications in debug mode does incur a memory/performance overhead. You should make sure that an application has debugging disabled before deploying into production scenario.



    Sunday, January 24, 2010 5:32 PM
  • User-1139608219 posted

    I feel your pain. I had a similar situation with Membership. May I suggest that you ask the moderator to move your query to the Security forum? This really is neither a setup or installation question. You might also post to the .NET library forum for Security.

    Good Luck 

    Sunday, January 24, 2010 8:07 PM
  • User-532524509 posted

    when u publishing a website then u have to use

    <compilation debug="false"/> 

    Monday, January 25, 2010 7:06 AM
  • User-1256387515 posted

    when u publishing a website then u have to use

    <compilation debug="false"/> 


    Unfortunately, making this change had no effect. In fact, it didn't change anything.


    Something is not right with my publishing. The first few times I published from VS05 it would wipe out the site on the server including everything in the bin folder. This was annoying because I then had to ftp the adodb.dll back to the folder.


    Now, it still tells it is going to delete all of the files but it doesn't. I just checked and is adodb.dll still in the bin folder. I'm not sure what the hell it is doing.


    I was going to try and move this thread to the security forum, but I can't seem to figure out how to contact the moderator.


    It is all very frustrating.



    Monday, January 25, 2010 7:39 PM
  • User-1139608219 posted

     Look in the lower left hand corner of this window... use Alert Moderators

    Tuesday, January 26, 2010 11:44 AM