When I deployed my VS 2005 website on Win 2008 server, it says "System.IO.FileLoadException: The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)"
Re: The given assembly name or codebase was invalid.
I'm not sure on which point its throwing the exception. It just blows up when I try to access the website with browser. The default page is a simple login page and has nothing in the Page_Load event unless only session reset code. Here's the page load event.
Code:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
If Page.IsPostBack = False Then
If Session.Count > 0 Then
Session.RemoveAll()
End If
'btnReset.Attributes.Add("onClick", "ResetControl();");
End If
lblError.Text = ""
End Sub
I checked .Net Framework 2.0 is installed and set in the application pool of the virtual directory.
Re: The given assembly name or codebase was invalid.
Hey,
Can you show the aspx for the page?
Have you had to register any dll's, either in the aspx or in the web.config file. If so, what are they, and do they exist on the server you are deploying to?
Re: The given assembly name or codebase was invalid.
I have attached the master file and default here. I don't have any dlls other than those that were created when I compiled the project. I have used crystal reports in my project and I have installed crystal report merge modules on the server. Prior to installing the CR merge modules, it was giving CR reference errors but when I installed the merge module, CR errors went away and this error started showing up.
Re: The given assembly name or codebase was invalid.
I am sure and I have double checked that ASP.NET 2.0 is installed since other 2.0 websites are running on the same box. I have checked that 2.0 is selected in the app pool my website is using.
When I published the website, this is how the page directive is changed.
Re: The given assembly name or codebase was invalid.
Oh my yes, I think it's faster, more responsive, it has gradients and very configurable. The only time I've had problems with it is when hosting a net.tcp WCF Service in it - I had to go commandline for that. They should have that fixed in IIS 7.2 I think. Did I mention the gradients?
Re: The given assembly name or codebase was invalid.
mendhak,
I have Network Service selected in the app pool identity, should I change it? I am still unable to figure out how to solve the authorization problem I discussed above. Any word on how to fix it?
gep13,
No problem, I thank you as you were getting in touch to solve my problem.
Re: The given assembly name or codebase was invalid.
Go to C:\webapps\vipcard, right click, properties, security, add NETWORK SERVICE and give it full permissions on that folder. Or, change that dropdown to Local System. The latter is not recommended.
Re: The given assembly name or codebase was invalid.
Actually, that might be it. It's a problem with your publish process. I'm betting that the other site, which works, is not deployed using publish or that it is a web application project. Am I partially right?