<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.asp.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Getting Started</title><link>http://forums.asp.net/15.aspx</link><description>The perfect forum for ASP.NET novices. No question too simple! &lt;A href="http://aspadvice.com/SignUp/list.aspx?l=21&amp;amp;c=17" target=_blank&gt;Email List&lt;/A&gt;</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Re: Disable images in ASP.NET</title><link>http://forums.asp.net/thread/3276022.aspx</link><pubDate>Mon, 06 Jul 2009 05:39:07 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3276022</guid><dc:creator>chintanpshah</dc:creator><author>chintanpshah</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3276022.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=15&amp;PostID=3276022</wfw:commentRss><description>&lt;p&gt;What do you mean by prevent donwloading?&lt;/p&gt;
&lt;p&gt;1. Disable right click on Image and save image?&lt;br /&gt;2. Type URL in Address bar?&lt;br /&gt;3. Copy from Temporaty Internet files folder?&lt;br /&gt;4. Send Web Request to download the image?&lt;/p&gt;
&lt;p&gt;Please let me know what you mean by prevent donwloading from above possibilities(there may be more than these)?&lt;/p&gt;</description></item><item><title>Re: Disable images in ASP.NET</title><link>http://forums.asp.net/thread/3274809.aspx</link><pubDate>Sat, 04 Jul 2009 16:17:50 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3274809</guid><dc:creator>rickj1</dc:creator><author>rickj1</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3274809.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=15&amp;PostID=3274809</wfw:commentRss><description>&lt;p&gt;add a web.config file to that folder and place&amp;nbsp;&amp;nbsp;Manjeetrocks example&lt;/p&gt;
&lt;p&gt;allso check out this tutorial an access&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.asp.net/learn/security/tutorial-07-vb.aspx"&gt;http://www.asp.net/learn/security/tutorial-07-vb.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;don&amp;#39;t forget to mark as answer if this helps&lt;/p&gt;</description></item><item><title>Re: Disable images in ASP.NET</title><link>http://forums.asp.net/thread/3274496.aspx</link><pubDate>Sat, 04 Jul 2009 09:07:59 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3274496</guid><dc:creator>hs_jha</dc:creator><author>hs_jha</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3274496.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=15&amp;PostID=3274496</wfw:commentRss><description>&lt;p&gt;Try this to prevent leeching -&lt;br /&gt;&lt;/p&gt;&lt;p&gt;In web config -&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot; ?&amp;gt;
&lt;br /&gt;
&amp;lt;configuration&amp;gt;
&lt;br /&gt;
	&amp;lt;system.web&amp;gt;
&lt;br /&gt;
		&amp;lt;httpHandlers&amp;gt;
&lt;br /&gt;
			&amp;lt;add verb=&amp;quot;*&amp;quot; path=&amp;quot;*.jpg&amp;quot; type=&amp;quot;jpg, jpg&amp;quot;/&amp;gt;
&lt;br /&gt;
		&amp;lt;/httpHandlers&amp;gt;
&lt;br /&gt;
	&amp;lt;/system.web&amp;gt;
&lt;br /&gt;
&amp;lt;/configuration&amp;gt;&lt;/p&gt;&lt;p&gt;Class -:-&lt;br /&gt;&lt;/p&gt;&lt;p&gt;using System;
&lt;br /&gt;
using System.Web;
&lt;br /&gt;
&lt;br /&gt;
	public class jpg : IHttpHandler
&lt;br /&gt;
	{
&lt;br /&gt;
		public void ProcessRequest(HttpContext context)
&lt;br /&gt;
		{
&lt;br /&gt;
			string FileName = context.Server.MapPath(context.Request.FilePath);
&lt;br /&gt;
			if (context.Request.ServerVariables[&amp;quot;HTTP_REFERER&amp;quot;] == null)
&lt;br /&gt;
			{
&lt;br /&gt;
				context.Response.ContentType = &amp;quot;image/JPEG&amp;quot;;
&lt;br /&gt;
				context.Response.WriteFile(&amp;quot;/no.jpg&amp;quot;);
&lt;br /&gt;
			}
&lt;br /&gt;
			else
&lt;br /&gt;
			{
&lt;br /&gt;
				if (context.Request.ServerVariables[&amp;quot;HTTP_REFERER&amp;quot;].IndexOf(&amp;quot;mydomain.com&amp;quot;) &amp;gt; 0)
&lt;br /&gt;
				{
&lt;br /&gt;
					context.Response.ContentType = &amp;quot;image/JPEG&amp;quot;;
&lt;br /&gt;
					context.Response.WriteFile(FileName);
&lt;br /&gt;
				}
&lt;br /&gt;
				else
&lt;br /&gt;
				{
&lt;br /&gt;
					context.Response.ContentType = &amp;quot;image/JPEG&amp;quot;;
&lt;br /&gt;
					context.Response.WriteFile(&amp;quot;/no.jpg&amp;quot;);
&lt;br /&gt;
				}
&lt;br /&gt;
			}
&lt;br /&gt;
		}
&lt;br /&gt;
&lt;br /&gt;
		public bool IsReusable
&lt;br /&gt;
		{
&lt;br /&gt;
			get
&lt;br /&gt;
			{
&lt;br /&gt;
				return true;
&lt;br /&gt;
			}
&lt;br /&gt;
		}
&lt;br /&gt;
&lt;br /&gt;
	}&lt;/p&gt;</description></item><item><title>Re: Disable images in ASP.NET</title><link>http://forums.asp.net/thread/3274489.aspx</link><pubDate>Sat, 04 Jul 2009 08:58:41 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3274489</guid><dc:creator>inbaa</dc:creator><author>inbaa</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3274489.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=15&amp;PostID=3274489</wfw:commentRss><description>&lt;p&gt;actually not only for image..i have a log file folder contains *.xml file .i have to stop view that log file if enter addres in browser.example http://localhost/sample/a.xml &lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Disable images in ASP.NET</title><link>http://forums.asp.net/thread/3274410.aspx</link><pubDate>Sat, 04 Jul 2009 07:35:31 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3274410</guid><dc:creator>shahed.kazi</dc:creator><author>shahed.kazi</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3274410.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=15&amp;PostID=3274410</wfw:commentRss><description>&lt;p&gt;If you stop disabling image downloading from the site - why have images in the first place. If you want to put images in an application, users can view the images and download by right clicking on the browser.&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Disable images in ASP.NET</title><link>http://forums.asp.net/thread/3274337.aspx</link><pubDate>Sat, 04 Jul 2009 06:40:00 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3274337</guid><dc:creator>manjeetrocks</dc:creator><author>manjeetrocks</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3274337.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=15&amp;PostID=3274337</wfw:commentRss><description>&lt;p&gt;&amp;lt;location path=&amp;quot;UserImagesFolder&amp;quot;&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;system.web&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;authorization&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;deny users=&amp;quot;*&amp;quot;/&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/authorization&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/system.web&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;lt;/location&amp;gt;&lt;/p&gt;</description></item><item><title>Re: Disable images in ASP.NET</title><link>http://forums.asp.net/thread/3274319.aspx</link><pubDate>Sat, 04 Jul 2009 06:17:50 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3274319</guid><dc:creator>inbaa</dc:creator><author>inbaa</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3274319.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=15&amp;PostID=3274319</wfw:commentRss><description>&lt;p&gt;Dear &lt;b&gt;asifchouhan,&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/b&gt;if i am directly type image name in browser that time i want to disable images view in browser(http://localhost/sample/a.jpg)&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Disable images in ASP.NET</title><link>http://forums.asp.net/thread/3274255.aspx</link><pubDate>Sat, 04 Jul 2009 04:55:22 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3274255</guid><dc:creator>asifchouhan</dc:creator><author>asifchouhan</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3274255.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=15&amp;PostID=3274255</wfw:commentRss><description>&lt;p&gt;You can do one thing disable the right-click on mouse and show alert box &lt;/p&gt;&lt;pre&gt;&lt;br /&gt;Put the following script in the head of your page:&lt;br /&gt;&lt;br /&gt;&amp;lt;script language=&amp;quot;Javascript&amp;quot;&amp;gt;&lt;br /&gt;&lt;br /&gt;am = &amp;quot;This function is disabled!&amp;quot;;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;bV  = parseInt(navigator.appVersion)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;bNS = navigator.appName==&amp;quot;Netscape&amp;quot;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;bIE = navigator.appName==&amp;quot;Microsoft Internet Explorer&amp;quot;&lt;br /&gt;&lt;br /&gt;function nrc(e) {&lt;br /&gt;&lt;br /&gt;   if (bNS &amp;amp;&amp;amp; e.which &amp;gt; 1){&lt;br /&gt;&lt;br /&gt;      alert(am)&lt;br /&gt;      return false&lt;br /&gt;&lt;br /&gt;   } else if (bIE &amp;amp;&amp;amp; (event.button &amp;gt;1)) {&lt;br /&gt;&lt;br /&gt;     alert(am)&lt;br /&gt;     return false;&lt;br /&gt;&lt;br /&gt;   }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;document.onmousedown = nrc;&lt;br /&gt;&lt;br /&gt;if (document.layers) window.captureEvents(Event.MOUSEDOWN);&lt;br /&gt;&lt;br /&gt;if (bNS &amp;amp;&amp;amp; bV&amp;lt;5) window.onmousedown = nrc;&lt;br /&gt;&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Regards&lt;br /&gt;&lt;br /&gt;Asif&lt;br /&gt;&lt;/pre&gt;</description></item><item><title>Re: Disable images in ASP.NET</title><link>http://forums.asp.net/thread/3274244.aspx</link><pubDate>Sat, 04 Jul 2009 04:44:15 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3274244</guid><dc:creator>inbaa</dc:creator><author>inbaa</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3274244.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=15&amp;PostID=3274244</wfw:commentRss><description>&lt;p&gt;Dear &lt;a href="http://forums.asp.net/members/chintanpshah.aspx"&gt;chintanpshah&lt;/a&gt;,&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  In my application i am using form authentication but above code not working in my application .where i go to check .&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Disable images in ASP.NET</title><link>http://forums.asp.net/thread/3273438.aspx</link><pubDate>Fri, 03 Jul 2009 11:54:04 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3273438</guid><dc:creator>chintanpshah</dc:creator><author>chintanpshah</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3273438.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=15&amp;PostID=3273438</wfw:commentRss><description>&lt;p&gt;If you use Forms authentication, deny the permission for Images folder to anonymous user.&lt;/p&gt;
&lt;p&gt;&amp;lt;location path=&amp;quot;Images&amp;quot;&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;lt;system.web&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;lt;authorization&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;allow roles=&amp;quot;Admin&amp;quot;/&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;allow roles=&amp;quot;User&amp;quot;/&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;deny users=&amp;quot;*&amp;quot;/&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;lt;/authorization&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;lt;/system.web&amp;gt;&lt;br /&gt;&amp;lt;/location&amp;gt;&lt;/p&gt;</description></item><item><title>Re: Disable images in ASP.NET</title><link>http://forums.asp.net/thread/3273431.aspx</link><pubDate>Fri, 03 Jul 2009 11:50:05 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3273431</guid><dc:creator>chintanpshah</dc:creator><author>chintanpshah</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3273431.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=15&amp;PostID=3273431</wfw:commentRss><description>&lt;p&gt;Put Images under App_Data Folder. This will not allow images to be downloaded.&amp;nbsp;&lt;/p&gt;</description></item><item><title>Disable images in ASP.NET</title><link>http://forums.asp.net/thread/3273369.aspx</link><pubDate>Fri, 03 Jul 2009 11:12:40 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3273369</guid><dc:creator>inbaa</dc:creator><author>inbaa</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3273369.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=15&amp;PostID=3273369</wfw:commentRss><description>&lt;p&gt;Dear Friends ,&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; How to disable image downloading in aspx page..for example if i type http://localhost/samplesite/a.jpg.it will not allow to view a image .give your ideas &lt;br /&gt;&lt;/p&gt;</description></item></channel></rss>