Sign in to follow this  
Followers 0

iis Publishing to IIS looses referenced project code

3 posts in this topic


Got a Web Site in C# (Can't show code)

Well it is more like a Web Service and classes which access MySQL

So I decide to factor out MySQL stuff into a separate project (to be used as a library)

So now I have,

1. A Web Site (Not sure if a Web Site is a Project - it doesn't have a project file???)

2. And a Class Library Project (MySQL static classes mostly)

in my solution.

The Web Site has a project reference to the Class Library Project and it has a dependency it. (Right Click -> Add Reference, and I think you need to right click on the solution to add dependencies and set the build order)

The Class Library Project is set to built first.

So the Web Service (In the Web Site Project) now calls static classes in the Class Library project.

To test this, I open up the Web Service file and press F5 - the whole thing compiles and runs locally in the test environment that VS2010 provides.

So, in the test env, it makes the link between the projects just fine - otherwise classes would be missing.

Now I then click on the Web Site and Publish it. It creates this folder with bunch of files and a lib/ folder which has the compiled dll files (Including one named after the Class Library Project).

And I copy that folder onto the IIS 6 on Win Server 2008, right click - make it an application.

Ok great - now I go to the URL. And it tells me that it cannot find the classes (classes that do NOT exist in the Web Site but in the referenced Project).

The thing is, the .dll (Version 0, for some reason???) that is named after the referenced project is part of the published website.

So I am not sure what I am doing wrong to publish a web site with code that exists in a referenced project in the solution to IIS.

It works just fine when debugging locally outside of the IIS.

Same goes if I transform Web Site to Web Application. Referenced project does not make it to IIS.

I am not the brightest when it comes to IIS - it took me half a day to figure out that (the super descriptive) HTTP Error 503 means that I am using the wrong application pool (Default one does not work for some reason).

And a second question,

For a SQL Connection, you can make that work easily with GridView, ListView, etc.

There is no such luxury when it comes to MySQL - you have to do everything from code?

Share this post

Link to post
Share on other sites


when you run with debug on what does it say?

Share this post

Link to post
Share on other sites

Posted (edited)

Turns out I had to enabled 32bit support in the pool on IIS.

Additionally, I had to set the referenced MySQL library reference to 'copy'

*Not exact wording

Edited by _Alexander

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.