httphandler

Set handler for PDF in IIS

大憨熊 提交于 2019-12-11 18:26:55
问题 I developed an HttpHandler in order to count number of downloads for PDF files. Now the problem is: How can I make IIS use my handler for PDF files? 回答1: For IIS 7 it does depend on which mode you are running IIS in. Microsoft has a great tutorial on this How to: Register HTTP Handlers which goes over all the different configuration scenarios but assuming you are running IIS 7 in integrated mode and your handler is a compiled binary you would need a web.config entry similar to the following:

Image server security asp.net HTTP Handler

霸气de小男生 提交于 2019-12-11 17:59:16
问题 I have two web application. One is for centralized Image server. Suppose they are a.com and b.com b.com is for image server. and a.com is where my application is hosted. I have created a handler for images ob b.com which process the request and add watermark and send it back to a.aspx. I am passing the path of the image (absolute like http://b.com/ImageHandler.ashx?id=imageurl) to the Handler on b.com Now I am not able to authenticate the request on b.com Now I am thinking about Handler which

HTTP Hanlder for string return asp.net

孤者浪人 提交于 2019-12-11 16:26:45
问题 I am using vlc plugin to play rtmp links for live streaming. It works fine if place the streaming link in target tag like in below code: <embed type='application/x-vlc-plugin' pluginspage='http://www.videolan.org' version='VideoLAN.VLCPlugin.2' width='800' height='600' id='vlc' loop='yes' autoplay='yes' target="rtmp://122.221.75.124:1935/live/myc001"> </embed> Issue: So my requirement is to hide the rtmp links from viewers by showing html source code. I used Http Handler to return links from

Setting HTTPHandler isreusable property

夙愿已清 提交于 2019-12-11 16:26:32
问题 I am using a HTTP handler to raise a file download.Basically code in the 'ProcessRequest' retrieves data from the database,creates a temporary copy of the existing template spreadsheet with a GUID as its name and writes data retrieved from the DB into it cell by cell using COM,raises a file download and deletes the temporary spreadsheet created.This whole process usually takes around 4-5 mins.But when we tried to concurrently test this process it took around 15 mins. I am wondering if setting

Ashx file creating images in MVC ASP.net

拈花ヽ惹草 提交于 2019-12-11 15:45:50
问题 I am dynamically creating images and need to show those images to users. For that i have created a ashx file but the problem is this ashx file is never getting called not sure why path issue or need add any tags in web.config .. while debugging its not going .. might be its not finding please advise. EDIT: When i directly hit the ashx url its going and showing some results EDIT 1: Got to know that session is null in the context any reason ? or MVC asp.net don't require ashx handlers please

asp:UpdateProgress never goes away after clicking on downloadable content inside a repeater

白昼怎懂夜的黑 提交于 2019-12-11 10:12:38
问题 I have a ASP.NET 3.5 page which has a repeater containing lines of information and custom buttons to change their status. Suppose it's like this btn1 btn2 btn3 Id Title Description Status1 Status2 btn1 and btn2 are used to change the status1 and 2 respectively. btn3 redirects to a custom handler which sends back a downloadable MS-Word report. This happens without actually leaving the page. The repeater is inside an updatePanel so I can update the statuses without having to reload the entire

Propagate the orientation setup at iTextSharp.text.Document creation to the Print dialog

依然范特西╮ 提交于 2019-12-11 07:35:03
问题 I use iTextSharp to create a PDF document in Landscape orientation by employing PageSize.A4.Rotate() to set its PageSize. The document is fed into a Stream and later saved into the database as a byte array (in a VARBINARY field). Stream stream = new MemoryStream(); iTextSharp document = new Document(); document.SetPageSize(PageSize.A4.Rotate()); var writer = PdfWriter.GetInstance(document, stream) document.Open() // Write to the document document.Close(); byte[] file = stream.ToArray(); /* In

Using IoC container as a service locator for HttpHandler

落爺英雄遲暮 提交于 2019-12-11 07:28:45
问题 This question relates to my other post. Ok so after a bit more messing around I decided to do it this way. Which seems to work fine when I run it, although I'm getting the following error in NUnit: Could not load file or assembly 'Castle.Core, Version=1.0.3.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) So not sure what is happening there???

How can I create an http handler to redirect all traffic to HTML pages?

て烟熏妆下的殇ゞ 提交于 2019-12-11 05:46:50
问题 Our company would like to redirect all calls to html files on our server to a separate page. The html pages are NOT in an asp.net application. In order to do this, I've been writing and IIS Handler in asp.net. 1) Is this possible to add an IIS handler to redirect static content that isn't served by any asp.net engine, i.e. stand alone files on the server? 2) If it is possible, how do I do this? I created an http handler in a class library. In the app.config I added the handler to the and

Forcing HttpHandler to use SessionState

限于喜欢 提交于 2019-12-11 05:22:18
问题 I am trying to customize a vended product that routes all requests through a HttpHandler. The handler analyzes the request to figure out what page to route the user to and performs a Server.Transfer(). Unfortunately, I need to access SessionState on a page and the handler doesn't implement IRequiresSessionState and is marked as internal so I can't inherit from it. After a lot of googling the best solution I found was to create an HttpModule that changes the handler that processes the request