Preview ASP files without server - asp.net

How can I get any browser to just treat a .asp/.aspx file as if it was .html and render it? (Without installing ASP server). It always pops up with a download box or displays the source.
Preferably for IE8. On Vista.
Thanks.

What about Visual Web Developer 2008 Express? It's a no-cost way to develop and view ASP.NET pages.

I know how to do this in Firefox (i.e., with the awesome force content-type firefox extension!), but I don't know how to do it in IE8.

You can just "render .asp" files in a browser like an HTML file. Browsers don't "speak" ASP.
ASP files contain scripts which are executed on a server so you have to have the server installed to get back the results you want.

I realise you wanted server-less, but in light of forcing a browser to render and ignore server side tags, as an alternative you could use Cassini web server - it's very lightweight and portable and you can still edit the asp/aspx files directly and it will render fine in a browser..

I'm with Robert Cartaino on this: you won't see what you expect to. But since these are your files, you could just temporarily re-name them to *.html and see what you get.

Related

Forcing PDF to be displayed in Browser, not to Download

Good day.
So, here is my issue.
I'm currently using sharepoint 2010 for web applications, I am supposed to display pdf as part of a web page. Currently, the browser tends to download the pdf file instead of displaying it.
Content-disposition is already set to inline.
I've also used iframe, and src is pointing to custom httpHandler.
I've already added "application/pdf" MIME type in the list of AllowedInlineDownloadedMimeTypes as per the advice in this link http://www.pdfshareforms.com/sharepoint-2010-and-pdf-integration-series-part-1/.
However, the application still failed to display it, and it prompts the user to download the file instead.
I'm using mozilla firefox v12 and ie8 to test the application, they both exhibit the same behavior.
What else is missing? Thank you.
It's important to remember that not all browsers, especially older ones like Internet Explorer 8, have the ability to render PDF content inline. In these older browsers, this was generally accomplished through plug-ins like Adobe Reader or Foxit being installed on the client machine.
Basically, if you are using an older browser, your users will likely need one of these (or a similar) plug-in installed. Otherwise when the browser encounters a PDF file, it will serve it to the user, as it doesn't really know how to deal with it.
There is also a chance that this could be a permissions / settings issue similar to the one addressed in this related question. You may want to review over some of the discussions within that thread as well as this Sharepoint 2010 one, which details a a setting called "Browser File Handling" and how it's default value of "strict" can affect how PDFs and other files are accessed.
He came across the solution while looking at the "Web Application General Settings". There is a setting called Browser File Handling and by default it is set to strict.

ASP.NET page formatting does not works

I have deployed an ASP.NET website on IIS 7. I was able to access my site using the URL http://**local host**/sitename.aspx and all the formatting of my pages is looking good.
But when I access the same page by using the URL http://**servername**/sitename.aspx from another system or on the same server where I have been deployed, the page formatting is not working properly.
What would be the best solution for this? Thanks
First a fall to check your Js/Css file path where you have not mention static file path with localhost name.
For more detail go to browser and browse your url and press F+12 so development tool will be open and check there for broken url.
I am not sure why you are worrying about formatting soo much. I mean formatting should not affect you much unless you use <pre> in your html.
There are ways to modify the HTTP Response Using Filters. Can you please makesure none of these filters present in your application for release mode.
Generally i use HTTP compression feature of IIS to compress my content, but in browser it looks correct to me.

Unable to view SVG on live site in browser

I'm having problems getting SVGs to display correctly on my website, http://www.byfrequency.co.uk. Instead the site displays the fallback PNG's instead.
When I preview the site locally, they display fine in all browsers which leads me to believe there might be some kind of issue server side. Trouble is, I have no idea where to begin to rectify this!
(My web server is Windows 2008 and currently configured for PHP 5.2, ASP, SSI, Perl, ASP.NET 3.5, CGI)
Other things I've investigated is to inspect the object (logo.svg) within Chrome. All this gives me is a message saying "Failed to load response" and is highlighted in red. I've tried putting the files on the local root to see if that would make a difference which is doesn't. And finally, I've looked up numerous articles about displaying SVGs but to no avail.
On a semi-related note, my web fonts also seem to fail to load when the site is inspected but render correctly in Chrome/Safari but not Firefox. Again, the path to these files are correct but I can't seem to be able to rectify this error.
Any thoughts and ideas would be much appreciated!
Solved this now with the addition of MIME types within a web.config file.

How can I get chrome to stop caching when working on an aspx file in visual studio

I'm currently editing some html/css within a aspx file inside of Visual Studio 2010. I'm using Chrome as my browser. When I make changes inside of Visual Studio and save/ctrl + F5 to run it frequently fails to load the new updated .css file due to pulling old cached versions of the CSS.
I've used visual studio as my primary HTML editor before but when I work with pure html/css files I just save and refresh the file in chrome and it will refresh the updated css 100% of the time. I've only started to experience this problem when working with aspx files and running things via ctrl + f5. Anyone have any ideas of how I can fix this?
Go to project properties, Web tab
Choose Start External Program in the Start Action section
Paste or browse to the path for Google Chrome (Mine is C:\Users\Chris\AppData\Local\Google\Chrome\Application\chrome.exe)
In the Command line arguments box put -incognito
If you would like the browser to open a specific page, then you will need to set the Visual Studio Development Server to use a specific port (ie 4066) then change your command line arguments to include that address, for example: -incognito localhost:4066/Default.aspx
Incognito Mode should prevent caching between sessions and even tabs.

newbie question about css property set up in Web developer 2010 Express

I am relatively new in C# and ASP.NET MVC.
There is something unusual that happens and it could be a simple property setup...
I have a MVC Web app and a css file associated with it in my Content folder.
Now everytime I do some changes in the css file I don't see these changes when I run the app. It seems that whatever I do the app keeps on using the old file. I can see it when I do a View Source on the page.
I played a bit with the Copy to Output Directory property in Web Developer without any good results.
Am I really missing something here ?
Thanks
Either restart casini, the web server for asp.net, the icon down by the clock or try hitting F5 in the browser a bunch of times.
Try clearing the cache in your browser.

Resources