c# - How to write to an iSeries FileShare from ASP.Net -


I wrote an asp.net webapp that writes a file at one place on our iSeries FileShare. The path looks like this: \ IBMServerAddress \ Filepath

This code executes perfectly on my local machine, but it fails when it is positioned on my (Windows) webserver.

I understand that I need to do some type of impersonation to prove access to IFS, but I am uncertain about how to move forward.

Here I am working with this code:

  string file path = "\\\\ IBMServerAddress \\ uploads \\"; Public Ink Settodisk (String Data, String Plant) {// Copyflow Stream to Stream = Faucet; Stream = file. Createtext (file path + plant + ".txt"); // create the file stream. Write (data + "\ r \ n"); // Write the data to stream the file. Stop it (); Return 0; }   

Again, this code executes perfectly on my local machine, but does not work when it is deployed on my Windows webserver - Access to the file path is denied.

Thank you for your help.

EDIT: I have tried to add a network account with the same credentials as an IFS user, IIS7 has created UNC path (iseries) on IIS7 Network drive (using the same credentials) - but get this error:

The path 'iseries' has been denied.

In general, my understanding of Windows is that the standard network of services generally does not have access to shares, such as the programs the user runs by.

So the first thing to know is whether you can write successfully to share a Windows file with a web server.

Believing that work, you will need one of two things to write in the I.B.I share. 1) An IBM IU user ID and password that matches the user ID and password, the process 2 / "Host Account" configured on IBM Networker

You may have better luck in using Linux / Unix based network file system (NFS), which is both s Windows and IBM Loaded. I.

Comments

Popular posts from this blog

java - ImportError: No module named py4j.java_gateway -

python - Receiving "KeyError" after decoding json result from url -

C++ Array Type Not Assignable in Copy Constructor -