I'm compiling assemblies in code called from a WebService
(which makes user being IIS_USR, and TEMP-directory being C:\Windows\Temp).

The assembly is created alright, but it's not loaded (get exception with "Access Denied").

I want to solve this by specifying where CompileAssemblyFromDom should put the assemblies.
(I don't want to have to change credentials or access rights.)
Can I do that?

Thanks for any help!

Recommended Answers

Set the OutputAssembly property of the CompilerParameters object to the location and name you want to use.

Jump to Post

All 2 Replies

Set the OutputAssembly property of the CompilerParameters object to the location and name you want to use.

Set the OutputAssembly property of the CompilerParameters object to the location and name you want to use.

Thanks for quick reply, but I just want to set the default folder.
(I want to reuse the file name generation in CompileAssemblyFromDom.)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.