- 0
iis Publishing to IIS looses referenced project code
-
Recently Browsing 0 members
- No registered users viewing this page.
-
Similar Content
-
Microsoft issues fix as Windows 11 25H2, 24H2 KB5066835, KB5065789 break many IIS websites
By hellowalkman,
- microsoft
- windows 11
- (and 13 more)
- 9 replies
- 0 views
-
Microsoft employee confirms Windows 11 may never 'fix' a key internet feature for office PCs
By hellowalkman,
- microsoft
- iis express
- (and 14 more)
- 5 replies
- 0 views
-
Microsoft shares "immediate remediation" script if you deleted this Windows system folder
By hellowalkman,
- 12 replies
- 0 views
-
Microsoft engineer shows how bad code can lead to your Windows PC slowing down
By hellowalkman,
- microsoft
- windows 11
- (and 12 more)
- 19 replies
- 0 views
-
Microsoft's official 'inetpub' folder lets hackers permanently block Windows updates on PCs
By hellowalkman,
- 9 replies
- 0 views
-
Question
+Red King Subscriber²
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?
Link to comment
https://www.neowin.net/forum/topic/1139052-publishing-to-iis-looses-referenced-project-code/Share on other sites
2 answers to this question
Recommended Posts