user6
user6

Reputation: 2033

Will the .cs files be compiled when loaded after i modified them?

I've got a ASP.NET website which I'm attempting to edit, however my Visual Studio broke. Someone just told me that i can simply use any text editor to modify the .cs files on the live webserver and whenever the page is opened they'll automatically be compiled.

Could anyone explain whether this is true or false?

I did some googling mentioning JIT-compiling. But it still isn't quite clear to me what it means and how it is used within .NET

Upvotes: 6

Views: 481

Answers (3)

Dhaval.Panchal
Dhaval.Panchal

Reputation: 31

If it is .aspx file then it will be fine but for .cs file it is not possible you have to republish the site again...because the dll is created when you publish the site...after that you can not modify the site...

Upvotes: 1

Ozgur Dogus
Ozgur Dogus

Reputation: 921

If you have just copy and pasted the website content to the webserver instead of publishing it( i guess you did so) it will work for you. But butting your cs files to the webserver is not a good practice. Best way is to publish your website and put the published files to the webserver. This way only required assemblies will be on the server instead of your source codes.

Upvotes: 0

Jeff Watkins
Jeff Watkins

Reputation: 6359

It depends on your server settings but yes, you can edit them directly and as long as you've not gone the page precompile route (given there are .cs files in there it doesn't look like it) the changes should get picked up by IIS. I would NOT do that on a live webserver however unless you're REALLY sure about the change you're making.

PS: Backups. Make them.

Upvotes: 5

Related Questions