简体   繁体   中英

Web Deployment IIS7

I have not deployed websites before on an IIS7. I was wondering if anyone could help me out to make sure that I am doing it right. I have an ASP/C# website that I am trying to deploy. The only access that I have to the server is through RDP. No FTP or whatsoever.

I've read guides about different deployment options and none really talks about File System deployment which I think is my only option.

Basically I deploy the files locally to my laptop and I copy and paste it to the remote server. I placed the compiled site to the \\intepub\\wwwroot and use the inetmgr to add that to the default site. I did set the correct app pool to .net 4.0 since that's the framework that I used for the asp site.

I can access some of the components/pages of the site but unable to for some of them. It's giving me errors but the one thing that I noticed is that the errors contains directory paths that refers to my laptop where I developed the site. So, I'm assuming that I am not publishing the website correctly.

Sounds like your returned table on the statement

if (GetData.getTable().Rows.Count != 0)

is null . This would throw the exception that you are getting. You can fix this by making sure your table object is an actual instance (assuming Datatable):

Datatable tbl = new Datatable();  //OK

Datatable tbl = null;   //Not OK

Also, you said the NullReferenceException was just one of them. Maybe that's not the root problem. You should have the part of the code that opens the connection and executes the query within a try/catch block, and if there is a problem there you can catch the error and know what is going wrong. If you can narrow down your problem, we can be more helpful.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM