kevp75
asked on
c# Writing to system temp folder?
One of my boss's hosting clients is coming up with an issue on his site. It seems that whatever web service they are using is causing a permissions issue. I think they get a list, and export it to XML, and this is where the errors occur.
Can someone point me in the right direction to look through their code? I don't know C# at all, so any reference to where I should begin looking would help...
Can someone point me in the right direction to look through their code? I don't know C# at all, so any reference to where I should begin looking would help...
What is the error?
ASKER
this is the exact error:
System.InvalidOperationExc eption: Unable to generate a temporary class (result=1).
error CS2001: Source file 'C:\WINDOWS\TEMP\4ir2ueu-. 0.cs' could not be found
error CS2008: No inputs specified
at System.Xml.Serialization.C ompiler.Co mpile(Asse mbly parent, String ns, CompilerParameters parameters, Evidence evidence)
at System.Xml.Serialization.T empAssembl y.Generate Assembly(X mlMapping[ ] xmlMappings, Type[] types, String defaultNamespace, Evidence evidence, CompilerParameters parameters, Assembly assembly, Hashtable assemblies)
at System.Xml.Serialization.T empAssembl y..ctor(Xm lMapping[] xmlMappings, Type[] types, String defaultNamespace, String location, Evidence evidence)
at System.Xml.Serialization.X mlSerializ er.FromMap pings(XmlM apping[] mappings, Type type)
at System.Xml.Serialization.X mlSerializ er.FromMap pings(XmlM apping[] mappings)
at System.Web.Services.Protoc ols.XmlRet urn.GetIni tializers( LogicalMet hodInfo[] methodInfos)
at System.Web.Services.Protoc ols.XmlRet urnWriter. GetInitial izers(Logi calMethodI nfo[] methodInfos)
at System.Web.Services.Protoc ols.MimeFo rmatter.Ge tInitializ ers(Type type, LogicalMethodInfo[] methodInfos)
at System.Web.Services.Protoc ols.HttpSe rverType.. ctor(Type type)
at System.Web.Services.Protoc ols.HttpSe rverProtoc ol.Initial ize()
at System.Web.Services.Protoc ols.Server ProtocolFa ctory.Crea te(Type type, HttpContext context, HttpRequest request, HttpResponse response, Boolean& abortProcessing)
System.InvalidOperationExc
error CS2001: Source file 'C:\WINDOWS\TEMP\4ir2ueu-.
error CS2008: No inputs specified
at System.Xml.Serialization.C
at System.Xml.Serialization.T
at System.Xml.Serialization.T
at System.Xml.Serialization.X
at System.Xml.Serialization.X
at System.Web.Services.Protoc
at System.Web.Services.Protoc
at System.Web.Services.Protoc
at System.Web.Services.Protoc
at System.Web.Services.Protoc
at System.Web.Services.Protoc
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Ok. So...how/where/what would I look for in the code to prevent this from trying to dump this file in C:\WINDOWS\TEMP
If you look at the call stack, it appears that there is no user code invoked yet. Try granting write permission to that directory.
ASKER
can't do it. Too much of a security risk invloved in letting the users have that kind of access.
There must be something in the code that we can change that will write the file to a different directory rather than the windows\temp directory
There must be something in the code that we can change that will write the file to a different directory rather than the windows\temp directory
I have not been able to locate a way to do that. Leave the question open for a while, and maybe someone else will see it who knows of a way.
I'm going to email another expert asking him to take a peek at this one....
Jim
Jim
ASKER
thanks Jim
He must bee off the air - I'll post a link...
ASKER
for some reason I kind of doubt the host would be willing to do that, however I will mention it to him.
So am I to assume that there is nothing code wise to specify the path where this temporary file will be stored?
So am I to assume that there is nothing code wise to specify the path where this temporary file will be stored?
This sounds like a configuration problem. Is this ASP.NET 2.0 or 1.1?
Bob
Bob
ASKER
.NET 2.0
Has the hosting company specified custom security attributes for the TEMP directory?
Bob
Bob
ASKER
no. they are the default
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
sorry for the delay. You've asked me a question that I cannot answer, and am just waiting on the powers that be to answer....