Execute c# code from a string?

A

Andy

I have a problem which most people may find weird but please stick
with me :) Is it possible to execute a c# application held in a
memory buffer (a string) without first saving it to disk? I need to
receive the code from a remote website over SSL and then execute it
from memory. Basically I'm trying to protect the source code from
being accessed from the website executing it. Is there a better way
without using DLL's? The users of the website must maintain full ftp
access.

Thanks
 
S

Scott Allen

Take a look at the following code and it might give you a start:
http://odetocode.com/Code/80.aspx, you'll just need to use a
CSharpCodeProvider and then find the entry point into the assembly.

Just keep in mind all the security implications of executing code over
the network.

HTH,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top