ashx

JSSOR with ASP.NET dynamic image

喜夏-厌秋 提交于 2020-01-25 23:48:10
问题 Here is my HTML Code that i am using <div u="slides"> <div> <asp:SqlDataSource ID="1" runat="server" ConnectionString="<%$ ConnectionStrings:constr %>" SelectCommand="SELECT Image FROM Gallery"></asp:SqlDataSource> <asp:Repeater ID="Repeater1" runat="server" DataSourceID="1"> <ItemTemplate> <img u="image" src="<%# "image.ashx?Id="+ Eval("Id") %>" /> </ItemTemplate> </asp:Repeater> </div> The Generic Handler .ashx for the image is THIS My Issue is that on the Slide, only the last image

Return Bitmap to Browser dynamically

眉间皱痕 提交于 2020-01-24 08:45:05
问题 I am cropping an image, and wish to return it using a ashx handler. The crop code is as follows: public static System.Drawing.Image Crop(string img, int width, int height, int x, int y) { try { System.Drawing.Image image = System.Drawing.Image.FromFile(img); Bitmap bmp = new Bitmap(width, height, PixelFormat.Format24bppRgb); bmp.SetResolution(image.HorizontalResolution, image.VerticalResolution); Graphics gfx = Graphics.FromImage(bmp); gfx.SmoothingMode = SmoothingMode.AntiAlias; gfx

How do I call an ASHX from inside an ASPX.VB function?

有些话、适合烂在心里 提交于 2020-01-11 12:14:12
问题 I need to get a value from an API I made with ASHX and normally it is called from javascript but I need to call it right in ASP.NET I figured this shouldn't be a problem but I'm not sure the syntax. 回答1: Well you have a couple options You can refactor the code in your ASHX to be in a shared library so you can access the methods directly and so can the handler. You can instantiate the handler and invoke the members if they aren't private. You can create a webrequest to the handler and handle

Visual Studio ASP.Net expand and collapse issue in ashx generic handlers

这一生的挚爱 提交于 2020-01-10 14:02:15
问题 I have Visual Studio 2008 Professional and I am having issues with expanding and collapsing method code blocks in ASP.Net Generic Handler pages (.ashx) I would have thought you could do the same thing like in the code behind of .aspx web pages. I have this same issue on other boxes even with VS 2008 Standard and VS 2005 Professional. All boxes have been fully patched (OS and Visual Studio.) Does anybody have any suggestions as to enabling this feature? 回答1: You can force Visual Studio to

Visual Studio ASP.Net expand and collapse issue in ashx generic handlers

夙愿已清 提交于 2020-01-10 14:01:35
问题 I have Visual Studio 2008 Professional and I am having issues with expanding and collapsing method code blocks in ASP.Net Generic Handler pages (.ashx) I would have thought you could do the same thing like in the code behind of .aspx web pages. I have this same issue on other boxes even with VS 2008 Standard and VS 2005 Professional. All boxes have been fully patched (OS and Visual Studio.) Does anybody have any suggestions as to enabling this feature? 回答1: You can force Visual Studio to

Catch exceptions in ASP.NET resulting from Generic Handler (ashx) file

被刻印的时光 ゝ 提交于 2020-01-10 04:36:05
问题 I am trying to get a different server side stack functioning with my ASP.NET site. My ashx file seems to be throwing a 500 Internal Server Error. How do I figure out what exception this ashx file is throwing or the reason the 500 is being thrown? When I attach to my IIS 7 w3wp.exe process, it doesn't throw an exception, but I'm reading that this is likely the case. The ashx file lives in the root directory of my ASP.NET site, and the Properties have it set to compile. GET http://uhc-8:8883

.ashx cannot find type error on IIS7 , no problems on webdev server

对着背影说爱祢 提交于 2020-01-03 05:16:51
问题 I am trying to make AspNetComet.zip work on IIS7 (a simple comet chat implementation) Here is a portion of my web.config. <system.web> <httpHandlers> <add verb="POST" path="DefaultChannel.ashx" type="Server.Channels.DefaultChannelHandler, Server"/> </httpHandlers> </system.web> <system.webServer> <handlers> <add name="DefaultChannelHandler" verb="POST" path="DefaultChannel.ashx" type="Server.Channels.DefaultChannelHandler, Server"/> </handlers> </system.webServer> When I publish the website

how to dynamically compile a ashx file?

一曲冷凌霜 提交于 2020-01-01 15:49:11
问题 I have a ashx file in a asp.net web project. It has a code behind cs file. The cs file is compiled into project dll & deployed to production. I found no way to dynamically change the cs file without deploying the whole project dll. I have been putting c# code into aspx (not .cs) file, after deployment, I can make change to a single aspx file, and deploy, IIS can dynamically compile & merge with its code behind c# code. Can I do the similar thing with ashx file? Here is a quote from MSDN. http

Caching ASHX Image Response

女生的网名这么多〃 提交于 2019-12-30 07:05:35
问题 I have created an ashx file to generate image thumbnails on the fly. I would like to cache these images client side after they are called the first time. URL: ~/image.ashx?dir=user&w=25&h=25&force=yes&img=matt.jpg Code Behind: public void ProcessRequest (HttpContext context) { TimeSpan refresh = new TimeSpan(0, 15, 0); context.Response.Cache.SetExpires(DateTime.Now.Add(refresh)); context.Response.Cache.SetMaxAge(refresh); context.Response.Cache.SetCacheability(HttpCacheability.Server);

Dynamically generated svg that works with IE9

元气小坏坏 提交于 2019-12-25 08:28:18
问题 Our web page uses dynamically generated svg from an ashx page. This works in IE8 and earlier using the Adobe SVG plugin. It does not work in IE9 (including compatibility mode). We are using the <object> tag. I am trying to modify the page to work with IE9. I was able to get SVG to render with a simple test svg I found on the web using: <embed src="http://oursite.com/circle1.svg" type="image/svg+xml" height="200" width="550"/> However if I change this to: <embed src="http://oursite.com