View File name only in AsyncFileUpload - asp.net

When i upload file using AsyncFileUpload path view like image contain C:\fakepath{filename}.
note: my correct path not contain (fakepath word).

I discover it is related to browser security. If i try to open my page in other browser like FireFox problem is solved so it is not problem.
Tutorial help my: Link1, link2, link3

Related

CSS not showing up when opening with files

My css only works when I open it with live-server. I didn't realized it until I tried opening the file
of my projects. The JS functionality is there, but my project is just stale, just black and white. I'm using sass and live-sass compiler. And also using a map api leaftlet and open weather api. SO please help,
cannot seems to figure out why my css is not present when I open my project on file or in another browser.
I have seen through your file and I think your issue is your image hasn't been loaded.
You have an image of the starry sky, right? You can only see the black and white page with some icons after the search because your image hasn't been loaded.
As you access the page by opening the file, the image URL in your CSS file is the path relatives to the current CSS file, which means the URL should be ../image/night.jpg.
If you access the page through the live server, that URL is the path relative to your host.
Hope that I understand your problem correctly. I am still learning too :)

CKfinder is always displaying blank screen when trying to use browse server option

I am using ckeditor/ckfinder in my application to update the xml files content. While the update of xml content is working fine in this project, the browse server functionality is not working.
When I click on the browse server functionality it only display empty page.
Tried to set the baseurl and baseDir attribute for the image file but still it is giving the same blank screen.
What can be the reason behind this?
You need to tell you ckeditor where to find ckfinder for the browsing capabilities :
Try something like that:
CKFinder.setupCKEditor();
It looks for CKEditor instances to set it up your current loaded CKFinder
I've got some of problems with ckeditor, with mvc.net.
Not sure, you use it or using asp.net.
I give you code i use, and it's running, now :
var editor = CKEDITOR.replace('html_content_editor');
CKFinder.setupCKEditor(editor, '/Scripts/ckfinder/');
where html_content_editor is the id of my html text control
and '/Scripts/ckfinder' is the url of the content of all files and directories use for ckfinder.
And pay attention about setting in web.config.
In app.setting node, you have to use :
<add key="CKEditor.Directory.Path" value="D:\Tmps\Documents\" />

Is there a tool to check CSS url files exist?

I've just been tasked with migrating a website from a Windows server to a Linux server.
One of the issues I've noticed straight away is that there are a number of CSS url() definitions that don't work because the case in the CSS is not the same as the actual file.
eg:
background: url(myFile.jpg);
while on the server the file is actually MyFile.jpg.
Does anyone know of a simple tool or browser plugin I can use just to scan the CSS file and verify that the url() declarations exist so that I can easily find and fix them?
The site is quite large, so I don't want to have to navigate through the pages to find 404 errors if I can avoid it.
Use Developer Tools in Google Chrome or Firebug in Firefox.
When you load HTML page with that CSS, it will show any missing resources in Network tab.
EDIT
I guess there is no any tool that will
Scan through CSS file for all the URLs
Check whether each URL exists or not.
But you can try following two links for these two tasks.
RegEx to get the URLs from CSS : With this you will have all list of URLs used in CSS
Check if a URL exists or not with cURL : An example in PHP was given.
You can still search for these two items separately and try fixing the issues.
Let me know if this helps.
What, if you simply write a http request into browser's URL bar pointing directly to the image and/or css?
How about firebug in firefox? It would give you all 404 in its console.
download
You can install Firebug if you're using Firefox or you can press F12 if you're using Chrome.. i think that goes the same with IE.. From there you will be able to check the URL and even view it in a new tab.
Turns out that the W3c Link Checker also scans CSS files which is very handy.
Had this have not worked I would have had to put together something like Vanga's solution.
Here's how I would approach this.
Make sure all image requests are handled by a (PHP) script, by adding the following to my .htaccess
RewriteRule .(?:jpe?g|gif|png|bmp)$ /images.php [NC,L]
Use file_exists() to check if the file exists, maybe even try if a lowercase version of the file exists.
Log missing files into a database table or text file.
Use a script to loop through the website's sitemap with curl to get a complete list of requested filenames that resulted in a 404.

Master.page doesn't load correctly

Yesterday I was trying to rename my *.aspx , *.cs, *.designer.cs files and class as well. Now i got issue with properly loading master.page on any page in my website(even that pages which i don't rename). I have no idea what happend I'm sure i doesn't make any mistakes in rename(using refactor). Every page are white but when i push ctrl+F5 combination of buttons the same page are showed correctly. Now i strike my head over the wall;/
Anyone got something like this before?
I hope I describe this problem understandable.
Thanks for advance.
Edit: I've made it works just clicked ctrl+shift+del and cleared all from firefox browser and it's started works...
Trying adding the master page reference in the config file:
<pages masterPageFile="MySite.Master" />
That's normal if everything becomes fine, only after ctrl+f5, seems your browser has cached some old named files, and can't apply them to new templates.
But if it isn'tm try to check what could you miss.
1. Check aspx files' code file property on match to new names;
2. Check aspx files' master page file property on match to new master page file.
Open webbrowser's developer tool(e.g. firefox - firebug), and check console for error. That usually helps to determine the error reason.

how do i get css source file path from firebug?

I need to modify a couple of classes in the css of the site i'm currently woking on. another person worked in it, so i really don't know where he has put the styles. i know firebug shows the css path on the corner, but it's just showing the url like this: http://localseo.org#3(line 149) . what does it mean? how do I get the file path? Thanks for the help everyone.
Click on that URL.
It will open the correct file to the correct line. From there you can easily see the path...
However, if you mean file path, on the server, you cannot get that from the browser or Firebug; it depends on your server settings.
Open firebug and you'll see a CSS pane/tab you can then select the stylesheet you want/need to edit.

Resources