Mitchel's Forums

Subject: WAP project with LINQ - can't seem to run project in DesktopModules/Module folder
Prev Next
You are not authorized to post a reply.

AuthorMessages
Laurence NevilleUser is Offline
New Poster
New Poster
Posts:10

02/17/2009 7:43 PM  

This is concerning the advantages & disadvantages of storing the VS project for a DNN module in the DesktopModules/Module folder of your dev site, or completely outside the site.

I have seen a number of tutorials recommending the former, and I used to do this, but hit a problem in my latest project which uses LINQ to SQL. By the way I am using VWD 2008 SP1, and the project is a WAP project in C#.

In VWD 2008 when you create a new WAP project, a web.config file is automatically created in your project folder. I used to find I could delete this, however it seems essential for LINQ to work. If I remove it, all LINQ controls (such as asp:LinqDataSource) become unrecognised, and the .dbml designer stops working.

However, if I leave the web.config file alone, the DNN site cannot run. It throws some error (something about virtual directories not being configured as applications - whatever it is it indicates that you have more than 1 web.config in the application).

So the only solution seems to move the project outside the website. The incovenience of this is that I have to copy files into the site to test after each build. I also can't seem to get debugging to work. I have configured the project per Charles Nurse's guide, but when I attempt to save the Web settings I am always prompted to create a virtual directory.

So, do you know of any way I can move the project back into the DesktopModules/Module folder and have it work, or how to get debugging working with it outside the website?

Many thanks.

Mitchel SellersUser is Offline
Site Admin/Owner
Guru
Guru
Posts:6027

02/20/2009 12:43 PM  
You will need to do a few things.

1.) Configure the .csproj file to use the internal webserver rather than IIS
2.) Deploy the code to the installation for testing (install it normally)
3.) Use "attach to process" for debugging. (I have a blog post about this somewhere)

-Mitchel Sellers
Microsoft C# MVP, MCITP
Director of Development
IowaComputerGurus Inc.

View Mitchel Sellers's profile on LinkedIn

3Essentials is my recommended Shared Hosting Provider

This site is hosted on a VPS from HostMySIte.com

Mosso is my recommended cloud computing provider. Use reference code REF-ICG to get $25 off your second month!

To get Guaranteed DNN Support check out our affordable DNN Technical Support Programs
You are not authorized to post a reply.
Forums >Development Discussion >.NET Development > WAP project with LINQ - can't seem to run project in DesktopModules/Module folder



ActiveForums 3.7