Access Local Files from IIS "silverligh" - iis

In a silver-light application I'm using to the following code in my Visual Studio development environment
it works fine
FileStream file = new FileStream(#"D:\OP20TS.jpg", FileMode.Open);
but when publish website on iis it give me
File Operation to not permitted Access to path D:\OP20TS.jpg is denied
I have tried to give IIS full permission to the path but not work how to handle this point
Thanks in advance

Related

IIS always search file in the wrong directory

On my PC (Windows 10) I wrote a new website (VB windows forms, .aspx files).
If I run the site from inside Visual Studio 2019, all OK, it starts and run correctly.
Now I need to have this site always "ON", I installed IIS, configured a "new website", name, directory and so on. I configured the new website in IIS to the directory where I develop, not in wwwroot.
Nothing works: I always have a 404 error.
To simplyfy everything I wrote a simple .HTML file, "prova.html", I placed it in the real website directory, and I tested it with Firefox: http://127.0.0.1/test.html.
Still 404:
URL requested http://127.0.0.1:80/prova.html
Physical path C:\inetpub\wwwroot\prova.html
It seems that IIS ALWAYS searches the file in the wrong path, but I configured the correct directory where the file is.
Of course if I place my test file in "inetpub\wwwroot ..." IIS finds and opens the file.
Any suggestion?
You can refer to the following steps to deploy the project in IIS:
Right click on your project and select publish:
Then add the site in IIS:
Solved ... installing IIS I didn't install the .NET part ... I feel very stupid.

iisnode not able to access file present in network file path

I am node app through iisnode. I can access file present in network path but when the application tries to access the file, it complains ' File doesn't exist'.
I tried adding IIS_IUSRS user group to have access to iisnode www directory in my local machine. I changed the username(from application pool) of the application to which I have permission(R/W) on the network path. Restarted my machine. But still problem persist.
Can someone help me if there is issue between iisnode and network file path.
const csv=require('csvtojson');
function fetchFile(){
sUsagefile ="\\\\abc\\xyz\\com.csv" .
csv().fromFile(sUsagefile));
console.log(sUsagefile);
}
Error: File does not exist. Check to make sure the file path to your csv is correct.
at C:\iisnode\www\node_modules\csvtojson\v2\Converter.js:81:37
at FSReqWrap.cb [as oncomplete] (fs.js:312:19)
I tried to access UNC path with iisnode and it was working perfectly.
Have you tried to grant IUSR and IIS Apppool\ read/writepermission for network path \abc\xyz\com.csv directly?
Besides, have you checked whether \abc\xyz\com.csv can be accessed from file explorer when IIS stop working.
It is suggested to use process monitor tool to monitor what path is read by node.exe. Please download process monitor from here:https://learn.microsoft.com/zh-cn/sysinternals/downloads/procmon then add a filter like “Path contains com.csv". Finally we would know what path the application is trying to read.

How to get freb.xsl file in IIS_FailureTrace directory

I am running IIS on Windows Server 2012 R2. I follow the follow steps to enable 'failed request tracing' in IIS:
http://blogs.msdn.com/b/kishorerajendran/archive/2015/05/08/iis-failed-request-tracing.aspx
I get a fr000001.xml file in my 'DataDir\Logs\IIS_FailureTrac directory, but there is no freb.xsl file. I tried go to IE and do http://localhost, that does not help.
How can I get the freb.xsl file?
On Windows Server 2008 R2, I completely deleted the W3SVC1 folder in C:\inetpub\logs\FailedReqLogFiles\ .Then I requested again the page with my error. The folder W3SVC1 was recreated, and this time it contained my failed request .xml as well as freb.xsl. (if that doesn't work, you could be lucky, try from a dos prompt, from c:\, dir freb.xsl /s. I've got multiple copies of it for iis, iisexpress, multiple web sites, etc... it's in My Documents\IISExpress\TraceLogFiles for example)

System.UnauthorizedAccessException: Access to the path 'E:\approot\

I have an xml file in my project at the root directory that is supposed to be used for read/write operations. And this code works fine when i run it on my local machine, however it throws
System.UnauthorizedAccessException: Access to the path 'E:\approot\...
when the application is deployed on Cloud. I have also tried adding following setting for elevated permissions in csdef file
<Runtime executionContext="elevated"></Runtime>
still no luck. Is Read/Write permission at root directory is not given in Azure? Here I am trying to write from the same application to its root folder. I am using following code to get the file path
string baseDirectoryParent = Directory.GetParent(baseDirectory).Parent.FullName;
No, you should use localstorage:
http://msdn.microsoft.com/en-us/library/windowsazure/ee758708.aspx

warning 21 warning failed to move file

i am using web sites developed in Joomla and i have hosted in my IIS 7 local server (Win Server 2008) and the website is live, but when client login to my website and try to upload file, they get the error warning 21 warning failed to move file
I went to Site -> Global Configuration, There i found the path of my logs and tmp are c:/xampp/htdoc/site/tmp & c:/xampp/htdoc/site/logs respectively.
please help me whats wrong with my configuration.
thanks in advance
You need to set the permission of folder where you want to store your file. Set the permission of that folder 777. You need to set 777 permission to these folder:
tmp
logs
Folder , where you need to save your file.
Hope this will help you.

Resources