Add A Handler To Allow Dowloading Script Or A MIME Map?

Jan 25, 2011

I created a script for Internet Explorer which can be installed using GM4IE (Greasemonkey for Internet Explorer) and it has the extension .gm4ie.

When I try to give the download link to this file on my server, it gives this error:
http://i.imgur.com/K7Rs4.jpg

page you are requesting cannot be served because of the extension configuration. If the page is a script, add a handler. If the file should be downloaded, add a MIME map.

How do I add this this hanlder or a mime map and where do I add this?

View 1 Replies


Similar Messages:

Configuration :: Add A Handler Or MIME Map To Allow Downloading Scripts?

Jan 25, 2011

I created a script for Internet Explorer which can be installed using GM4IE (Greasemonkey for Internet Explorer) and it has the extension .gm4ie.

When I try to give the download link to this file on my server, it gives this error: [URL]

page you are requesting cannot be served because of the extension configuration. If the page is a script, add a handler. If the file should be downloaded, add a MIME map.

How do I add this this handler or a mime map and where do I add this?

View 1 Replies

Web Forms :: Code To Dowloading A Copy Of A File From Server?

Jul 14, 2010

What is the code to dowloading a copy of a file from server? For example to access some webpage using different font like chines ,Hidi etc.they will provide a option to download the corresponding font for read the site.

View 2 Replies

MVC :: File Action - Flash Mime When Using Name?

May 7, 2010

On a controller action I am returning a file do display:

[Code]....

View 8 Replies

Configuration :: Get Mime Type For Web.config, Iis7?

Feb 4, 2011

I need to get the mime types in an IIS7 environment. They should be in:

<configuration>
<system.webServer>
<staticContent>
<mimeMap...

As I understand it, in IIS7 if I can get to it I should see both custom additions in my web.config as well as the mime types defined in the IIS manager at the machine level.

I don't understand how to get to this data. I have messed with the configurationmanager but I am not getting anywhere. I can get a section names system.webServer but I don't see any of the actual data as colleciton of properties or as xml.

View 1 Replies

Configuration :: Adding New MIME Types To IIS7?

Sep 10, 2010

I added a could of new MIME types to IIS7 per the instructions. I also modified an existing one.

On my browser, I still see the 'old' MIME type of the modified one.

Tried iisreset, app pool recycling, etc.

COuld there be some .config file somewhere affecting this?

View 2 Replies

Web Forms :: Creating Files From MIME Content?

Jul 29, 2010

I am using the below code to create file after reading the body

from the database. body contains the content of the document in MIME format.

string dataDir = "D:\Temp_Attachment\";
string strXml = System.Text.Encoding.UTF8.GetString(System.Convert.FromBase64String(body));
Stream wordFile =
new
FileStream(Path.Combine(dataDir, filename),
FileMode.Create);
StreamWriter xmlWriter =
new
StreamWriter(wordFile,
Encoding.Default);
xmlWriter.Write(strXml);
xmlWriter.Close();
wordFile.Close();

The problem i'm facing is that above code works for text files.

When I'm creating image files or pdf files, those files give an error on opening.

View 6 Replies

Make IIS To Deliver Stylesheets With Correct MIME Type?

Jan 11, 2010

Currently my IIS is serving CSS files with no Content-Type header. How to change it? Should I change it on my application or in the server?

View 1 Replies

Web Forms :: How To Get Content (MIME) Type Of Uploaded File

Jul 22, 2013

When inserting a binary file do you know what will be the correct content type for extensions like .txt or .gif or others not in your sample? Is there a list of correct content types?

View 1 Replies

Web.config And Mime Types - Website Starts Showing Internal Error?

May 13, 2010

I want to add mime type in web.config to make downloading files for users.but after adding mime tag, website starts showing internal error 500 and removing this, it runs fine but when user click on files to download then it show error that file not found. So I need to add proper mimetype for my uploaded files. So pls tell me the proper way to add it to web.config file.

View 3 Replies

Web Forms :: Reading Body Of Email - Multipart Message In MIME Format

Mar 18, 2010

In my application, while reading body of mail. I am getting the text of the body as "This is a multipart message in MIME format."

Here is my code
SmtPop.POP3Client pop = new SmtPop.POP3Client();
pop.Open(serverName, 110, emailId, passWord);
SmtPop.POPMessageId[] messages = pop.GetMailList();
if (messages == null) return;
foreach (SmtPop.POPMessageId id in messages) {
try { Byte[] b = new Byte[0];
SmtPop.POPReader reader = pop.GetMailReader(id);
SmtPop.MimeMessage msg = new SmtPop.MimeMessage();
msg.Read(reader); Boolean kasbook=false;
String caseCode =null; string body = msg.Body; // read message
Regex rx = new Regex(@"(d{6}?)",RegexOptions.IgnoreCase);
MatchCollection matches = rx.Matches(msg.Subject);
if(matches.Count > 0) caseCode=matches[0].Value;
kasbook = Regex.IsMatch(msg.Subject,@"(kas)",RegexOptions.IgnoreCase);
if (msg.Attachments == null) continue;

Why I am not able to read the body of the mail.

View 8 Replies

How To Call Static File Handler From HTTP Handler In IIS7 And 4.0

Jan 24, 2011

I create custom HTTP handler for auto generating file and I want to tell IIS7 to serve current request like normal static file because I need to use IIS and web.config file to control compression setting and any other HTTP header of current requested file.I know. there is an internal class called StaticFileHandler in ASP.net. But I cannot access it. Or you have any other way to work like this.

View 1 Replies

Difference Between Adding Code In The PreLoad Event Handler And At The Top Of The Load Event Handler?

Oct 3, 2010

Is there a technical reason for the existence of Page.PreLoad or is this just convenience to have a place where you can neatly place code that always have to be executed before the Load code? Is there a difference between adding code in the PreLoad event handler and adding code at the top of the Load event handler? And what would be a typical scenario where you use PreLoad?

View 2 Replies

Handler And Generic Handler?

Mar 16, 2010

In Visual Studio 2010, when you say new Item, you can see Asp.NET Handler and Generic Handler. Can you tell me what's the difference, I think it came with .NET 4.0 because I couldn't find related thins on Google.

View 1 Replies

Difference Between Application/x-javascript And Application/javascript Mime Type?

May 6, 2010

There is any difference between application/x-javascript and application/javascript mime type?

View 3 Replies

Configuration :: MIME Type For .licx Extension/Error 53 Unable To Resolve Type ' <add Type="TabStrip" Version="7.0" />'...

Nov 12, 2010

I am not sure if I have found the right forum for this one.

the problem is:

I have a .licx file in my rootfolder.

I am getting the error:

Error 53 Unable to resolve type ' <add type="TabStrip" version="7.0" />' C:inetpubwwwrootCrop_ApplicationCrop_Applicationeo_web.licx 7 Crop_Application

,which I get for all the types that are in the xml file(i just gave one of them).

A friend told me that I have to add the type .licx in the MIME type in the IIS .

The problem is that I find the MIME type, I add the extension type .licx but I do not know the MIME type for .licx

View 1 Replies

Handler Like Mvc Routing Without Mvc?

Feb 21, 2011

I used to build my web apps in asp.net in such there is only one page witch is default.aspx

http://localhost/mywebapp1/?q=blog/posts/get/42


I do parse 'q' by myself and do all processing. I don't really need to all MVC staff. I just want to remove "?q="

View 2 Replies

IIS 7.5 Can't Open Handler Mappings?

Sep 13, 2010

I need to update the handler mappings on IIS 7.5 to allow URLs that don't have extensions to be routed to an application. The application was originally written in ASP.NET 2.0, but then later upgraded to ASP.NET 3.5. I don't know if that has relevance, but I've had no problem updating handler mappings for other .net 3.5 apps before. I should also note that this works fine on IIS 6.0

This is the error message I get when I click the Handler Mappings link in IIS 7.5 (notice there isn't really an error message as such, which would be helpful):

Handler Mappings

There was an error while performing this operation.

Details:
Filename: ?D:path oweb.config
Error:

OK

Has anyone seen this before? If you need more info, let me know and I'll supply.

View 1 Replies

Trying To Write An HTTP GET Handler?

Mar 24, 2011

I'm trying to write an HTTP GET handler. The path should start with http://site/processTask and have a set of URL-encoded parameters. I have the following in my web.config

<httpHandlers>
<remove verb="*" path="*.asmx"/>
<add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false"/>
<add verb="GET" path="processTask*" type="MyHandler.ProcessTaskHandler, MyHandler"/>
</httpHandlers>

now when I type the URL http://mysite/processTask in browser I get HTTP 404 but if I change the add verb line to the following one:

<add verb="GET" path="processTask.asmx*" type="MyHandler.ProcessTaskHandler, MyHandler"/>
and type http://mysite/ProcessTask.asmx in browser the handler is run and I get the response from the handler. What's the problem? Why is the handler run only when the path contains .asmx? How do I change web.config so that .asmx is not required?

View 1 Replies

ASHX Handler; Fires Up Only Once?

Jun 23, 2010

I've got a simple ASHX handler that returns an dynamically generated image; the image is generated from a custom created class, and an object belonging to this class is passed to the handler using Session (I'd rather avoid using QueryString).The handler is used as the URL of an image on a ASP form which is very simple: a drop down list, a button and an image. Basically, depending on what the user selects from the list, the appropriate image will be generated once the button is pressed.

At the start the actual image has it's Visible property set to false; I don't want the handler to display anything before the data is all there.Once the button is pressed, the required Session parameter is added containing the necessary object, and the page is refreshed using Server.Transfer. When the Page_load method detects that the Session parameter has been correctly set, it sets the Visible parameter on the image to true.After that the handler fires up and generates the image.

So far so good... However, if the user now picks something different from the list and presses the button, despite the correct object being passed in the Session, the image won't be updated. In fact, the handler won't even fire up (if I put a breakpoint in there). I need to close the browser window and reopen it for it to work.Any ideas what could be the cause of such behaviour?I suspect the answer is very simple, and I just don't know something fundamental about ASP (or handlers)...

View 1 Replies

Cannot Set Textbox Value In Callback Handler In C#

Mar 16, 2010

I am using ASP.NET Callbacks (that implements the ICallbackEventHandler) and in the handler, I try to set a value of the text box:

txtName.text = "Test";

but this value is not set. Is this a limitation with callback? It appears I cannot do much in a callback handler other than sending back a string to the client side (ofcourse I can access the Session etc)

View 2 Replies

C# - How To Configure An Http Handler In IIS 7

Nov 24, 2010

Here's what I want to do:

I've created a class library project
and this has a class implementing
the IHttpHandler interface. Let's
call this class ZipHandler. Let's
say the namespace is Zip.
I want that whenever any Http
request comes for a zip file, my
ZipHandler should handle it,
regardless of whether the request is
to an Asp.Net application or a
normal virtual directory.

Queries:

Is it possible (it should be given
the hype about integrated pipeline
etc. in IIS 7)?
How to do it?

View 2 Replies

MVC :: Retrieve Route Value In Handler?

Mar 7, 2010

The code below is a handler to allow variables in css files. Works fine except when, as shown, I need to retrieve a value from the mvc route. In the code below the variable "Forum" is a route value.

What code do I need in this handler to retrieve the route value of Forum?

[Code]....

View 13 Replies

Getting Event Handler Name From Database?

Dec 10, 2010

I've created a database table with a bunch of links I'm going to use in my program. All seems fine, except for the onClick even handler, which doesn't work as a string. Anyone got an idea how I can set it? There's no constructor for EventHandler accepting a string...

View 4 Replies

File Saveas Using Handler?

Nov 27, 2010

i write a html code for file saveas using file uploading control. here file saveas working for aspx code but not working for html code to call handler(ashx).

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved