Application insights shows a dependency failure stating a file was not found. However the file exists on the server and the application works fine.
API version: 2.1.0
Hopefully some one can help me.
you have something making a web-like request to a file on disk?
that might work for you from the local machine but if someone else hits the site from any other machine, then "d" doesn't mean anything to them. I don't have a D drive and even if it did my D drive doesn't have your png in that place.
someone else's web browser loaded your page, and tried to load an image from D:\home\site\wwwroot\....
somewhere in HTML you have something like:
<img src="D:\home\site\wwwroot...\image.png"/>
but you should have something like
<img src="image.png" />
or
<img src="data/pdfletter/image.png"/>
or something with a relative path within the website, not an absolute path on the machine hosting the site.
in this case, it looks like Application Insights is working correctly and telling you that someone else can't load your images?
Related
I've been using codekit for ages now, and now I've been using the version 3 since it came out.
I really like this app, but there's something I never really understood and I decided to post it here (hoping to finally understand how this works and how to make it works like I want).
I have MAMP pro installed, with some hosts.
Let's say I have this list of hosts with (fake) document root:
localhost -> documents/site1/dist
test -> documents/sitetest/dist
and let's assume that test is a wordpress site having the site url set to
http://test/ in the database.
In codekit, when I enable the browser refresh, the bottom options asks me to write down the address I would visit to see my website.
Now, if I navigate to http://test/ my WordPress website loads and I am able to see everything.
In codekit I then setup the browser refreshing options to be the following:
Animation: ticked
Refresh Delay: 0.0 seconds (default)
Preview: empty
Document-Root Subpath: empty
External Server Required: on
External Server Address: http://test/
Then when I click on the green dot (server) to preview my website, I'm expecting codekit to navigate to http://test:5757 and to properly display my website. This, unfortunately, is not the case. When I click on the preview (or server, it doesn't really make any difference for me) codekit navigates to my mac IP and the website is either not loading or loading without any external resource.
I don't think the issue is in the way I load the resource in WordPress (i use enqueue sources properly, and the website without using codekit refresh function works, load and displays as meant to).
So far, I always switched my current project to use the localhost host (changing the document root in MAMP pro) and then telling codekit to use the localhost ip as external server, but now it's a bit more complex, as I have way more projects and I was hoping not to change back and forth the document root to use codekit built in refreshing feature.
Is it possible? am I missing something here?
I read all I was able to find as well as watched the videos on codekit, but this bit here is still a bit unknown to me and any help would be really appreciated.
Thanks
PS: No need to mention I am on a MAC, right? :)
I don't believe I actually managed to fix this.
I'll leave the answer here in case somebody else is facing the same issue.
The problem I had was that my website http://test/ was using a theme called test.
Codekit, for refreshing the browser, uses a simple string search and replace in the URL, and so everything that looked like "test" in the url was replaced by the internal ip.
Quick example:
http://test/wp-content/themes/test/index.php
became
http://192.168.0.1:5757/wp-content/themes/192.168.0.1:5757/index.php
and of course no file where loaded successfully, as the path was wrong.
To fix this?
Just change the MAMP pro address to something that won't be present in the URL (in my case, the MAMP pro host called test became dev.test and problem solved.
I wish I had a more generic way of asking this question but I really can't figure out what could be going on.
Using dev-channel Chrome 26 (and IE 10) I'm hitting a simple html site in my public dropbox here
In my browser Handlebars.js (from cdnjs.com) never loads and I get an error. Heck, according to the Network tab it never even tries to load it. Yet click through the source and the script file - it is definitely a live link. Why handlebars? Additionally, running the same exact site with a local server loads just fine.
I'm at a loss here what could possibly have this effect. You'd think the issue would be running the server in dropbox but it seems to be the actual browser misbehaving. And why on earth does it not make any request at all?
My repo by the way is on github on the preformance-tuning branch
It looks like Chrome is throwing an insecure content warning on your scripts. Most likely because you are trying to access content hosted over HTTP while your site is being served from dropbox using ssl. Most likely a Chrome security setting silently block scripts it considers "insecure"
I've an ASP.Net MVC website which manage some business logic for an entreprise.
For one task, I've to make them edit a file(photoshop file). They have a samba access to it.
How can I make them OPEN this file(and not download a copy and work on the copy)? I need them to edit this file and save their changes directly in the original. And I need that it opens the file with the program associated with this file.
It's for a small group of administrators, so it's not a big deal if I need to put the website that generate those pages in trusted website or something like this.
I tried to put a <a href="file://D:\test.txt"/>test</a> but it doesn't seems to work.
How to do this? Is there a special way to generate this in asp.net?
I'm open to all suggestion.
It has to work at least with safari/mac, windows and other browser are bonus
EDIT
I made it works on IE(Security settings + indicating a network path), but most users which will use this will be on safari/firefox :/ any idea?
EDIT: What about putting an url like: myProtocol://someParametersForMyFile and having an application on the client machine able to load myProtocl links? Something like magnet links
Does anybody knows how it is called? I found this: http://www.macosxautomation.com/applescript/linktrigger/index.html But I'm not sure it can't open a any file
Try <a href="file:///D:/test.txt"/>test</a> for a local file. For a share on a remote machine use <a href="file://MyServerName/MyShareName/test.txt"/>test</a>.
I ended doing an applescript, which is capable of handle custom URL, then the applescript read the parameter in the url and does the appropriate copy.
Source: http://applescript.tv/linktrigger/
I want to go live with my site.
...but I need help with a security violation I am incurring.
I've seen various threads on this forum regarding a crossdomain.xml file to include and link to, but I don't get it... no matter what I try I still end up with the same result. You'll note below that it is not recommended to use crossdomain hacks.
FWIW, this only happens when I export a release build... I can load the php data w/out an issue in my debug/developing phase locally in Flex.
What gives? When I make a PHP based request for data I always get this error popping up:
Error #2044: Unhandled securityError:.
text=Error #2048: Security sandbox
violation:
http://alubow.com/jml_testing/viewable/alubow_project.swf
cannot load data from
http://www.alubow.com/jml_testing/foldergrab.php?ipath=assets/bitmap/portrait_thumbs/&tpath=assets/bitmap/portrait_imgs/.
at utils.php::DirectoryReader() at
alubow_project/newScroller() at
alubow_project/mainClickOut()
Is there code I need to add to get this to work? Do I need to configure the server I am using?
I will need to go live with this site soon and these errors I am getting both locally and serverside (via a browser) are unacceptable.
COULD THIS BE A PROBLEM WITH THE FLASH PLAYER I HAVE INSTALLED?
I have the debugger version of flash player 10.
jml
The problem is with the www prefix. I guess you are trying to load a page with out the www subdomain and the URL you are looking for does have that prefix.
Now, what you need to do is one of the following:
change the request url
add both www.yourdomain.com And yourdomain.com to the crossdomain.xml
call the url dymanicaly. this is the best solution but needs some more work. you can get it done using ExternalInterface and connection to JS here. OR you can use the BrowserManager.
Enjoy!
It may be because your app is requesting from www.alubow.com when hosted from alubow.com, which triggers a request for http://www.alubow.com/crossdomain.xml, which doesn't exist. You could refer to your app as www.alubow.com/jml_testing/viewable/alubow_project.swf and avoid the error.
Alternately, you could add a crossdomain.xml file to www.alubow.com.
I know this is weird but for local files loaded through the flash player you probably just need to hit this page. Look near the top right for something that looks like an example image. It's actually a Flex application. Click successive tabs until you read the Global Security Settings panel (currently 3rd from the left, with an image of a globe and padlock). Select the "Edit locations" menu, and choose "Add location". You can then add your swf or your folder of swf's into the whitelist and they'll be able to access outside resources magically.
I realize this is an edge case, but it seems that asp.net doesn't allow reading images from the root drive. To test this I wrote the following very simple application:
On the page I have:
<asp:Image ID="test" runat="server" />
In the code behind I have:
test.ImageUrl = #"C:\test\image.jpg";
test.AlternateText = File.ReadAllText(#"C:\test\text.txt");
Both files exist as you'd expect and have the correct permissions. When viewing the source of the page we get an img tag that looks like the following:
<img id="test" src="C:\test\image.jpg" alt="some text to read" style="border-width:0px;" />
When I run this in VS no image is displayed. If I copy the source, paste it into an html file and load it into a browser the image is displayed. Can anybody explain why this is?
The src of an img tag should rarely point to a file on your local disk. It should be an URI. Perhaps you'll have more success using the file:///C|/test/image.jpg syntax.
The browser is preventing the images from being displayed. I created a static HTML page containing an tag whose "src" pointed to an image on my local file system. If I open the HTML page locally, everything works as expected. However, when I hosted the static HTML page in a web server, it stopped working.
I ran ProcMon while loading the HTML page from the remote server, and the local file was accessed (some columns truncated for display purposes):
iexplore.exe 6376 QueryDirectory C:\test.jpg SUCCESS test.jpg
iexplore.exe 6376 QueryOpen C:\test.jpg SUCCESS
iexplore.exe 6376 QueryDirectory C:\test.jpg SUCCESS
iexplore.exe 6376 CreateFile C:\test.jpg SUCCESS
iexplore.exe 6376 ReadFile C:\test.jpg SUCCESS
iexplore.exe 6376 CloseFile C:\test.jpg SUCCESS
However, IE did not display the image. I repeated the test with Firefox. When accessing locally, the ProcMon results were the same. When accessing remotely, ProcMon didn't produce any output.
It has to do with the way you're assigning the img src. By providing C:\test\image.jpg as the sourc you're instructing the BROWSER to get the image from the user's local drive rather than from the server's location.
All src directories/files should be specified using relative paths for your website. For example: If your homepage was located on your server at c:\www\homepage.aspx and you also had an images sub-directory located within the www directory then you'd want to specify your img src to be something like this: <img src="/images/image.jpg" alt="Image" />
I know that you said the permissions were correct, but double check and make sure the aspnet\aspnet_wp account has permissions to the file location. When you run an asp.net application it runs under this account. When you load an HTML file in your browser, it runs as you.
This is because you're feeding a "URL" into the src tag, and the browser treats it as such. When you open a file such as C:\test.html it is simply rendered by the web broswer and uses the local source as the starting URI, but when you load from another source, such as http://localhost/test.html then the file needs to be accessible through http, and http://C:\test\image.jpg is not a valid URL.
Seems to work properly if you use a url. Not sure what the difference there would be though.
This is a browser security "feature". The goal is to prevent malicious websites from accessing your local files, and causing them to either be executed or uploaded to the website without your knowledge.
In order to get past it I believe you will have to change your security zone to "local intranet", then drop the security down to pretty much allow everything.
Obviously this is only viable for machines you directly control.
The html code is invalid. It should not render in any browser, VS, firefox, IE or any other. In fact it does not in firefox.
If You display images from C: drive or any local drive in a server side web application development. It will create conflict-ion from client drive if they are same file and folder name in client computer. That's why you Can't read images from C:\ in ASP.NET.
To read the images from local server drive first you will to create virtual directory for your local drive(C:\Gallery) then you can display images from folder.
example:
<
asp:Image Id="Image1" ImageUrl='<%# Eval("Filename", "http,://localhost/ImageGallery/{0}") %>' Width="150px" Height="150px" runat="server" />
please remove from http, like http
Shankar Chaurasia