Asp.net web app with c # and vb.net as in codeb

We currently have an asp.net site with some modules developed in VB.Net and some in C # (not just in classes, but also in separate aspx pages and in code). We decided we wanted to move to the web application model as we need to implement CI with TFS.

Problem:

When we create a C # web application, copy the files from the site and say convert to a web application, it gives Could not Parse errors

(maybe because the files are vb.net files)

When we create a VB.NET web app, copy the files and say convert to a web app, it only converts vb.net pages and publishes errors to all C # pages saying Could not load type

The asp.net site will be multilingual.

Help would be much appreciated!

+2


source to share


3 answers


Can you split your application into two separate web applications that run from the same root directory? Just put the rendered c # dll in the trash with the VB.net compiled dll and put all the aspx pages wherever they need to be for your site structure.



I haven't tried this myself, but it should work. You will need to create a separate project and reference any data layers etc. Just move your C # code into a new application and see how it goes. Not the best solution, but it beats converting from one language to another.

+3


source


Place all App_Code folder names containing C # code in the CodeSubDirectories section in your web.config



ps this is how it is done in DotNetNuke

0


source


You can do this with websites, but not with web applications. Also note that if you want or need to do this, web applications don't really have the extra layer of power that websites lack. Web applications may have deployment benefits in some environments, but visual studio 2010 and 2012 will publish asp.net websites and web applications as with ease.

0


source







All Articles