Hide/secure Image Path In .net ?

Nov 16, 2010

How can I hide/secure image path in asp.net? I don't want the user see image path directly.

I have googled with my problem and found the following URL:

http://www.codeproject.com/KB/web-security/ImageObfuscation.aspx

On this page it suggests changing the image path like this:

<img ID='ImageControl'
src='ShowImage.axd?Path=<% EncryptString("C:Imagesimg.ext", Page) %>'

But if user copy this image src and paste it into their browser with the domain name then it will show image.

View 5 Replies


Similar Messages:

Web Forms :: Secure File Download / Hide File Path And Location While Downloading Files

Jan 14, 2013

I have made an application where I am displaying the .pdf , .doc , .docx  files. These files are uploading from an Admin Panel.When user place a mouse pointer on download icon provided in front of every file, it shows the complete path where it’s get saved.I want to avoid this path visibility even when user place mouse on download icon and even if it Inspect an element (as most modern browser will have this functionality).

View 1 Replies

Data Controls :: Hide Image Control If Image Path Does Not Exist In Database

Dec 6, 2012

I have div In my page that in this div I put image control

<div id="DLogos">
<asp:Image ID="imglogo" runat="server" CssClass="ILogos" /> </div>
according to below code
<div id="Dart1_I1" visible='<%# !string.IsNullOrEmpty(Eval("image1").ToString())%>'>

If in database was image it show div and if there wasn't any image it didn't show div but above code is for div that I put in datalistnow I want do some thing like that for Div that I don't put it in datalist I should write code for that in behindecode page but I don't know How I can do it?behind code

SqlCommand _cmd = new SqlCommand("storeinfo1", _cn);
_cmd.CommandType = CommandType.StoredProcedure;
_cmd.Parameters.AddWithValue("@behcode", data);
_cn.Open();
SqlDataReader _dr = _cmd.ExecuteReader();
while (_dr.Read())

[code]....

View 1 Replies

C# - Hide An Image Path On Asp Page Without Http Handler?

Apr 20, 2010

I have many static images under a directory in my site structure, and I'm not concerned with hotlinking or copy-protecting the images. For a myriad of reasons, what I need to do is not show the image path on the site (or show a fake one).

Is there any way to do this without resorting to an http handler or a worker asp.net page?

View 2 Replies

C# - How To Secure Web Service To Only Allow Relative Path Calling

May 19, 2010

I have ASMX services for my web application that I would only like available to the same application.Is there a way for the web service to only be accessible by the same application, such as relative/absolute path restrictions?

View 3 Replies

Web Forms :: Display Image In Image Control From Image Path

Oct 1, 2010

I know how to display an image in gridview from image path in database. Now, I want to display an image in an asp.net image control from image path in database. Can anyone point me to a tutorial? I haven't been able to find one that explains how to do it when I don't know what the image path will be. The images are in the root folder.

View 35 Replies

Data Controls :: Display Image In GridView With Path In Database With Image Enlarge Option?

Jan 12, 2013

<asp:ImageField DataImageUrlField="photo" > <ItemStyle Width="50px" Height ="50px"
HorizontalAlign="Center" VerticalAlign="Middle" ></ItemStyle>
</asp:ImageField>

i need to display image from database in gridview.  i have the above html and a select query executed from code behind which displays the image.

i am storing the image path in the database table and image in a folder.

Queries related to above

1. image size not able to set

2. the gridview image column will display image if the column data is not blank. but if its blank i have 2 default images  male image and female image

so if the field is blank i need to display one of the default images depending on the gender selected
 
3. if the image is clicked it should show enlarged image as popup 

View 1 Replies

Data Controls :: How To Bind Image Src In Image Path SQL Database

Nov 22, 2015

I Have a Image Tags In My Web Application. I Upload The Image Path and stored In Database. How To Retrieve the Image Path Into Images Tags Using Database in Asp.Net..

View 1 Replies

How To Hide A Physical File Path On A Force Download

Apr 29, 2010

I have been supplied this example for a force download[URL]However, what I would like to know what to do is to hide from the users the physical file path from the users as they do not have direct access to this server. Is there away for me to keep this file path private on a download?

View 3 Replies

Web Forms :: Hide Download Path Using Response.redirect?

Feb 5, 2010

How can i Hide download path in asp.net when i am using reponse.redirect("abc.zip") ?

Example if i used reponse.redirect("abc.zip") but if reponse.redirect("abc.zip") is wrong path it will display error with our full download path .if it right path it working fine .

If Clscon.rs.Read Then
Response.Redirect(Clscon.rs(9))
End If

View 7 Replies

Web Forms :: Hide Image Control In DataList If Image Does Not Exist In Database

Aug 17, 2012

this is my code in page

<asp:DataList ID="DDLC" runat="server">
<ItemTemplate>
<div id="Dmainart">

<div id="Dart1_12">
<div id="Dart1_I1"><asp:Image ID="asp:Image" runat="server" CssClass="TPH" ImageUrl='<%#Eval("image","image/house/article/image/{0}")%>' Width="90px" Height="64px"/>

[code]...

i want if there wasnot any image in image column in database this div <div id="Dart1_I1"> display="none".

View 1 Replies

Create Image Slideshow Where Image Path / URL Comes From Database

Apr 6, 2012

How to create image slide show  where image path/url comes form database, using asp .net c#..

View 1 Replies

Image URL Does Not Show The Image If The Absolute Path Is Given?

Feb 14, 2011

I have used two image tag in one i use relative path but in other absolute the image with absolute pat is not shown.

here is code

[code]....

View 1 Replies

Web Forms :: Code To Hide Download Link Works, But Now Need To Access A File *outside* Physical Path?

Mar 20, 2010

here's the code so far:

[Code]....

[Code]....

mov is a quicktime file, my server has the mimetype: video/quicktime .......... but as I read, this code forces the save as download box which is exactly what i want :) now, here's the catch, i the file I am fetching is NOT on the physical path... it is on a completely different server:Protected Sub LinkButton1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles LinkButton1.Click
Response.Clear()
Response.ContentType = "x-msdownload"
Response.AppendHeader("Content-Disposition", ("attachment; filename=mydownload.mov"))
Response.TransmitFile("http://myOTHERserver.com/files/mydownload.mov")
Response.End()
End Sub

Obviously this doesn't work since TransmitFile requires that the file be on your physical path, so how do i do this? Someone said you must use the stream method. Do you have any sample code I could try? I've tried the HTTPStreamReader object but it's giving me issues, so I would love to find out if there is anyway this might work. Now here's some more important information: this are HUGE video files.. we are creating a downloads page... written in asp.net -- so you create an account using the .net membership class, then you select the file you want, go through a form where you enter your billing info and then after you pay a certain fee (this is already implemented), you go to your "downlaods" area in your account... there you have access to the files......... the reason i'm doing this is because i want to hide the download link, which will be something likehttp://myOTHERserver.com/2340987sdfkjhalsdlkjh23 ... (something really crazy)....... we don't want people seeing this on the status bar (Therefore hiding the download link is ESSENTIAL)........ the files are a good 500MB each approximately; so i would love to hear all of your suggestions as to making the streamreader work for me and how long would it take for the streamreader to READ the file........

View 7 Replies

Secure Login With Additional Context Information Passed Through (which Also Needs To Be Secure)

Jul 13, 2010

My web application will be launched through existing thick client applications. When launched, an HTTP POST request will be generated including information like the userID and additional context information (basically stuff like the target user's name, birthday, etc.).

My plan for authentication is for there to be a look-up table in the database. If the username is already there, automatically login the user, but if there is no entry in the database, redirect the user to an initial login page which will be used to create that database entry.

My question is how to secure this against MITM and other security holes. How can the request generated through the thick client be on an SSL connection? Doesn't an SSL connection have to be authenticated with the username (and password) first? And if so, will the additional context information be publicly exposed until the user is logged in?

View 1 Replies

HTTPS Doesn't Work - Secure And Non Secure Data On Web Page?

Oct 25, 2010

I have a browser compatibilty problem with https? I have SSL installed and is in usage. Until today morning, my https part is working well. From then, Https is shown as https(with slashed in red color) saying the page has some insecure content. I have not changed any code and suddenly i see this problem in chrome. In IE 8, i see the same problem but on every page, it shows me a popup if i should allow to opne secure and non secure or just secure. Firefox has no issues . It shows correct https without any problem. I am fed up with it searching all over. Why is this happenening for me in Chrome and IE 8.

View 3 Replies

Security :: Secure Login From A Non Secure HTTP Page?

Oct 24, 2010

I have a custom mini login user control that I have embedded in the top of my website which shows on every page. These pages are non-secure HTTP://. I would like to avoid having to redirect the user to a HTTPS page to perform the login but I definitely don't want to send login credentials to the server in plain text.

I am trying find a method to send the user's login credentials encrypted via https from a non-secure (http) page.

I tried to set the postbackurl for the login button to itself but in https, but the user's input is not retained and the buttonLogin_click is not fired when I set the button postbackurl property. My ASP.net web application is VB.Net framework 4.0

I am assuming this can be done because I see lots of websites where login fields are on available on every page and they are running http and I can believe they are not encrypting the login credentials.

View 3 Replies

Crystal Reports :: Use Crystal Report Formula To Hide Image When Image Value Is Null?

Dec 7, 2010

using vb.net 2005 and crystal reports.

I have a typed dataset that is displaying an image using an iBlobFieldObject on a report. I need to use a crystal report formula field to hide the image when the value is null, does anyone know how to do this?

View 1 Replies

How To Get Full Path Of Image

Feb 5, 2010

i m using this code for getting path of image

System.IO.Path.GetFullPath( fileupload.PostedFile.FileName).ToString();

but this code give me false path.

View 8 Replies

C# - Cookie In Default Not Secure But Secure In SSL?

Aug 10, 2010

I have a GUI when i log in i create a cookie and it encrypt it. I am usin SSL.

I check in the Login.aspx page if the cookie is secure, which it is. but then before going to the default page it goes to the Global.ascx page.

Here in the Application_AuthenticateRequest it gets the cookie and decrypts it for the default page..

Now i know that it is getting the same cookie as all the other attributes match the one that was created in the Login.aspx page excet that the secure value is "False".

this is the case for all other pages after default. the value of the cookie.secure is false.

why is this happening as i want all the pages to be secure by SSL.

Also the pages are opening as https not http.

here is my web.config

[code]....

View 1 Replies

MVC Switching Between Secure To Non - Secure Content

Jan 18, 2010

After logging to the mvc site using a secure connection (https), calling actions using https connection show up with the user logged in but calling actions using http it bahaves as if user didn't log on. Since I need to use a virtual directory for https connections(and can't use that directory for http connection) Https links start with: [URL]

View 1 Replies

Page Contains Both Secure And Non Secure Items

Sep 17, 2010

I'm working on a legacy web application - frames and a mixture of html, asp and aspx. The entire site is https. For some strange reason when I hit a specific page I get the magic message that says the Page contains both secure and nonsecure items. (IE obviously doesn't want to tell me what those resources are) I have checked the page that's being loaded and there are absolutely no http://... links - everything is relative links.

I have fired up fiddler and checked what's being requested - everything looks fine. I am completely at wit's end here. I have absolutely no idea why I'm getting this message, but it's completely screwing with the site.

View 3 Replies

Load Image Path In Code?

Jan 6, 2011

in my source view of my web page I am using some images. Right now I use the code:

HTML Code:
<img class="smallIcon" src="skins/itsoft-images/small-icon.png" alt="Small Icon" width="20px" height="20px" />
I use this image many times in my pages, as well as other images. I don't want to use a path like this because if I ever change the location of the images, I will have to update a hundred pages.I would like to place the path to the image in my web.config file, and have the code load from there. I'm use to doing it in PHP but I can't figure it out in .Net.

Something like:

HTML Code:
<img class="smallIcon" src="<%@ ICON_FILE_DIR %>" alt="Small Icon" width="20px" height="20px" />
Is that even possible?

View 14 Replies

Validate An Image Path In Javascript?

Oct 8, 2010

I have an image like: img src="" class='listPartialLoader' alt='loading' I am assigning the 'src' value with data from an ajax call. Some times if the image is not found I want to add a default image path like"Images/default.jpg". But how can I check whether the image is exist or not using javascript? (Basically I want if the image is not found add a default image)

View 3 Replies

Configuration :: Upload Image Path To DB?

Jun 2, 2010

i has an page, there i have to export the file under the same virtual directory and have to save that saved location to the Database table, below is my code

string strFilePath = FileUploadAddProduct1Image.PostedFile.FileName;
string strFileFormat = Path.GetExtension(FileUploadAddProduct1Image.PostedFile.FileName);
string strFileSize = Convert.ToString(FileUploadAddProduct1Image.PostedFile.ContentLength);
//dtDateTime = objBusy.GetSpDate();
if (strFileFormat == ".jpg")

[Code]....

my doubt is by the above code the Table-Path seems D:WinnerVirdir1Imageimg1.jpeg then next i assign the same path to the image control but the image is not displaying, incase if i hosted to any other server then also it should work.

View 1 Replies







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