Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
NullReferenceException when creating DataSet
Message
De
30/05/2003 02:50:43
 
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Divers
Thread ID:
00792723
Message ID:
00794380
Vues:
37
Kevin,


>I haven't seen this before so I suspect it has to do with the
>unconventional way you created the second application.


The global.asax file is indeed the key to the solution. But I think now that there may have been a misunderstanding about the fact that my second Web application is not a newly created Web Application.

I found a solution to my problem and conclude the following:

1) When you create a Web Form WebApp Application in VS.Net with the following file structure:

\InetPub\wwwroot\WebApp
\InetPub\wwwroot\WebApp\bin

,the directory \InetPub\wwwroot\WebApp will contains among others the *.aspx, global.asax, web.config files. The application can be started by pointing e.g. at http://iis/WebApp/WebFormStart.aspx

2) When this application works, you can copy this application to an existing (production) website \InetPub\wwwroot\WebSiteName, by creating the following file structure on the server:

\InetPub\wwwroot\WebSiteName\WebApp

(SUBstructure is intended to seperate several webapplications on the same website)

You then copy ONLY the *.aspx files to this directory \InetPub\wwwroot\WebSiteName\WebApp. If there's no web.config in the directory \InetPub\wwwroot\WebSiteName, you can copy the WEbApp's web.config to this directory. (If there is one but with non conflicting settings it can be left alone.)

The dll's from \InetPub\wwwroot\WebApp\bin go into the \InetPub\wwwroot\WebSiteName\bin directory

The only thing that has to be done is to copy the global.asax file.

This global.asax goes INTO THE \InetPub\wwwroot\WebSiteName directory and NOT INTO the \InetPub\wwwroot\WebSiteName\WebApp directory.

If you would do the latter, you'd get an "Object reference not set to an instance of an object" error.

You can now reach the Web Form application at http://www.Website.com/WebApp/WebFormStart.aspx

Conclusion: The only files that are needed are *.aspx,*.dll, web.config, global.asax and *.dll (but the have to be copied in the right directory)


Thanks for your time,


Mark
If everything seems to be going well, you obviously don't know what the hell is going on !
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform