.NET Development
wwscripting, c# code execution
Gravatar is a globally recognized avatar based on your email address. wwscripting, c# code execution
  n/a
  All
  Apr 26, 2015 @ 11:48pm
hi , we have a application using wwscipriting class library.

We are trying to execute a c# code programmatically. The application was an old one, and now we are trying to upgrade the application to 4.5 .NET framework.

I see , the dll is trying to create a TMP file under C:\Windows\System32\Inetsrv folder and is being denied access.

How can i resolve this issue..?

I tried giving access to NETWORK SERVICE to the folder but it didn`t work. Please !!

I am tyring to do this..

https://west-wind.com/presentations/DynamicCode/DynamicCode.htm

Sth like this is happening..

http://stackoverflow.com/questions/28217690/dynamic-compilation-using-codedom-csharpcodeprovider-on-azure


Thanks
praveen

Gravatar is a globally recognized avatar based on your email address. Re: wwscripting, c# code execution
  Rick Strahl
  galip
  Apr 27, 2015 @ 08:58am
When you compile code this way an assembly is created on disk and you have to have rights in the folder where the assembly is generated.

The way to make sure this works is either to explicitly specify where the assembly is generated (ie. not in the current folder but in a specific location that you do have right to write like a web\temp folder, or you can use the compiler options to compile the code into an in-memory assembly.

I haven't looked at that code in a really long time, and that code was written for .NET 1.0 at the time, so I believe there are a number of additional options you have to direct and manage the compiled output.

+++ Rick ---



hi , we have a application using wwscipriting class library.

We are trying to execute a c# code programmatically. The application was an old one, and now we are trying to upgrade the application to 4.5 .NET framework.

I see , the dll is trying to create a TMP file under C:\Windows\System32\Inetsrv folder and is being denied access.

How can i resolve this issue..?

I tried giving access to NETWORK SERVICE to the folder but it didn`t work. Please !!

I am tyring to do this..

https://west-wind.com/presentations/DynamicCode/DynamicCode.htm

Sth like this is happening..

http://stackoverflow.com/questions/28217690/dynamic-compilation-using-codedom-csharpcodeprovider-on-azure


Thanks
praveen



Rick Strahl
West Wind Technologies

Making waves on the Web
from Maui

Gravatar is a globally recognized avatar based on your email address. Re: wwscripting, c# code execution
  n/a
  Rick Strahl
  Apr 27, 2015 @ 09:32am
Is there a way I can change the compiler options ( to make the compiler use in memory) , using wwscripting .dll ?


When you compile code this way an assembly is created on disk and you have to have rights in the folder where the assembly is generated.

The way to make sure this works is either to explicitly specify where the assembly is generated (ie. not in the current folder but in a specific location that you do have right to write like a web\temp folder, or you can use the compiler options to compile the code into an in-memory assembly.

I haven't looked at that code in a really long time, and that code was written for .NET 1.0 at the time, so I believe there are a number of additional options you have to direct and manage the compiled output.

+++ Rick ---



hi , we have a application using wwscipriting class library.

We are trying to execute a c# code programmatically. The application was an old one, and now we are trying to upgrade the application to 4.5 .NET framework.

I see , the dll is trying to create a TMP file under C:\Windows\System32\Inetsrv folder and is being denied access.

How can i resolve this issue..?

I tried giving access to NETWORK SERVICE to the folder but it didn`t work. Please !!

I am tyring to do this..

https://west-wind.com/presentations/DynamicCode/DynamicCode.htm

Sth like this is happening..

http://stackoverflow.com/questions/28217690/dynamic-compilation-using-codedom-csharpcodeprovider-on-azure


Thanks
praveen



Gravatar is a globally recognized avatar based on your email address. Re: wwscripting, c# code execution
  Rick Strahl
  galip
  Apr 27, 2015 @ 09:39am

I don't recall - but yes you can definitely change the code.

+++ Rick ---



Is there a way I can change the compiler options ( to make the compiler use in memory) , using wwscripting .dll ?


When you compile code this way an assembly is created on disk and you have to have rights in the folder where the assembly is generated.

The way to make sure this works is either to explicitly specify where the assembly is generated (ie. not in the current folder but in a specific location that you do have right to write like a web\temp folder, or you can use the compiler options to compile the code into an in-memory assembly.

I haven't looked at that code in a really long time, and that code was written for .NET 1.0 at the time, so I believe there are a number of additional options you have to direct and manage the compiled output.

+++ Rick ---



hi , we have a application using wwscipriting class library.

We are trying to execute a c# code programmatically. The application was an old one, and now we are trying to upgrade the application to 4.5 .NET framework.

I see , the dll is trying to create a TMP file under C:\Windows\System32\Inetsrv folder and is being denied access.

How can i resolve this issue..?

I tried giving access to NETWORK SERVICE to the folder but it didn`t work. Please !!

I am tyring to do this..

https://west-wind.com/presentations/DynamicCode/DynamicCode.htm

Sth like this is happening..

http://stackoverflow.com/questions/28217690/dynamic-compilation-using-codedom-csharpcodeprovider-on-azure


Thanks
praveen






Rick Strahl
West Wind Technologies

Making waves on the Web
from Maui

© 1996-2024