First of all, thank you for the great addition to the VS2005 - the WAP.
I have upgraded my ASP.NET application from 2003 to the 2005 Web Application Projects version. But I cannot get my project to run in the new environment, here are the questions/issues/comments that I have:
I followed the migration process exactly as it is described on the Scott's website.
The migration completed with no errors.
Everything builds fine within VS2005 WAP.
When I run the application, I cannot get the following server error resolved: "BC30002: Type 'System.DirectoryServices.DirectoryEntry' is not defined." (The
System.DirectoryServices is refereced and imported. Again, the project builds fine and the intellisence for the
System.DirectoryServices works as well.) If I comment out the lines where I use the
DirectoryServices classes then everything works well.
One thing to note about this error is that it occurs only when I use it in my own classes. On the other hand, if I declare the
DirectoryEntry within the codebehind of any webform, then no error occurs.
When I click Rebuild Project under the
Build menu, all of the DLLs are deleted from the BIN folder. This is a real frustration. Please help...
And lastly: Are the .resx files still required for every webform file in the application?
1. System.DirectoryServices -- that seems odd. I'll try to repro.
2. Rebuild Project -- I cannot recreate that behavior.
I did a simple test where I copied an assembly into the bin folder, then made a change in my WAP project so it's assemblies would be re-built. The copied assembly was not deleted.
3. No, webform .resx files are not required.
You should confirm there is no date worth saving in them, make a backup (always!) then delete them.
I had to swet some more to finally find the source of the problem!
What was happenning is that prior to convertion to WAP2005, I had all of my classes stored in the "app_code" folder.
When I renamed the folder "app_code" to "app_code1" and built the project again, the application started working immediately and flawlessly.
One more comment: I love the new configuration window in WAP where I can choose the web development server vs IIS and have the option of omitting the
virtual directory. I wish the same could be done to the Web Site Projects because as of now you do not have a choice to run the website like this:
http://localhost:1892/default.aspx.
Thank you again for making our live easier with great products...
Thanks for the feedback. We are considering the change to allow using the root folder for WSP (a lot of users like this in WAP).
Sorry I did not catch the App_Code issue. When you said you converted from VS03 to WAP, I assumed you would not have an App_Code folder.
As part of the migration from WSP to WAP, we rename the App_Code folder to Old_App_Code. The reason has to do with the compilation differences between the two models. In WAP, all standalone class files, including those in the
App_Code folder, are pre-compiled into a single assembly and placed in the bin folder. When you publish your web app, the bin folder is copied to the server too.
On the server, requests to a aspx/ascx page will cause the asp.net to compile that page and link it to the pre-compiled binary. But because this is asp.net 2.0, if it finds a special folder like App_Code it will also compile
it. As a result you will have two classes with the same name being referenced in your web app.
When you manually renamed your App_Code folder, you resolved this issue.
alesha911
Member
161 Points
42 Posts
WAP Issues
Apr 10, 2006 06:03 PM|LINK
First of all, thank you for the great addition to the VS2005 - the WAP.
I have upgraded my ASP.NET application from 2003 to the 2005 Web Application Projects version. But I cannot get my project to run in the new environment, here are the questions/issues/comments that I have:
One thing to note about this error is that it occurs only when I use it in my own classes. On the other hand, if I declare the DirectoryEntry within the codebehind of any webform, then no error occurs.
Thank you very much.
Senior Consultant
mbund
Member
630 Points
126 Posts
Microsoft
Re: WAP Issues
Apr 10, 2006 07:34 PM|LINK
1. System.DirectoryServices -- that seems odd. I'll try to repro.
2. Rebuild Project -- I cannot recreate that behavior.
I did a simple test where I copied an assembly into the bin folder, then made a change in my WAP project so it's assemblies would be re-built. The copied assembly was not deleted.
3. No, webform .resx files are not required.
You should confirm there is no date worth saving in them, make a backup (always!) then delete them.
alesha911
Member
161 Points
42 Posts
Re: WAP Issues
Apr 17, 2006 08:18 PM|LINK
Thank you for your reply...
I had to swet some more to finally find the source of the problem!
What was happenning is that prior to convertion to WAP2005, I had all of my classes stored in the "app_code" folder.
When I renamed the folder "app_code" to "app_code1" and built the project again, the application started working immediately and flawlessly.
One more comment: I love the new configuration window in WAP where I can choose the web development server vs IIS and have the option of omitting the virtual directory. I wish the same could be done to the Web Site Projects because as of now you do not have a choice to run the website like this: http://localhost:1892/default.aspx.
Thank you again for making our live easier with great products...
Senior Consultant
mbund
Member
630 Points
126 Posts
Microsoft
Re: WAP Issues
Apr 17, 2006 08:37 PM|LINK
Thanks for the feedback. We are considering the change to allow using the root folder for WSP (a lot of users like this in WAP).
Sorry I did not catch the App_Code issue. When you said you converted from VS03 to WAP, I assumed you would not have an App_Code folder.
As part of the migration from WSP to WAP, we rename the App_Code folder to Old_App_Code. The reason has to do with the compilation differences between the two models. In WAP, all standalone class files, including those in the App_Code folder, are pre-compiled into a single assembly and placed in the bin folder. When you publish your web app, the bin folder is copied to the server too.
On the server, requests to a aspx/ascx page will cause the asp.net to compile that page and link it to the pre-compiled binary. But because this is asp.net 2.0, if it finds a special folder like App_Code it will also compile it. As a result you will have two classes with the same name being referenced in your web app.
When you manually renamed your App_Code folder, you resolved this issue.
Hope that makes sense...