VS 2008 - PDF File Is Locked When Viewing Through Website

Sep 2, 2011

I have a web page in my project that views a selected pdf file. The problem is the file stays locked with the process w3wp.exe which I assume is the adobe file reader or something. How I can release this process after viewing it? Or another way of viewing it without locking the file?

Here is how I am doing it:

Code:

Dim File1 As String = System.Configuration.ConfigurationManager.AppSettings("Report")
Dim R1 As String = Page.Request.QueryString("r")
If R1 <> "" Then
Dim path As String = File1 & R1

[Code]..

View 1 Replies


Similar Messages:

VS 2008 Files Locked Even When Application Is Not Running

Nov 19, 2010

Why is visual studio locking my files even when application is not running?The files are not under any source control or readonly either.Before this it didn't allow me to edit the aspx.vb while debugging, though I can do that in other projects.

View 9 Replies

VS 2008 Concurrent Viewing And Logon ID?

Jun 7, 2010

I am a windows application developer doing a web application with VB.net and SQL 2008 for the first time.

I have developed a web application where users are supposed to view a file after selecting from a listbox. I then pick the users logon ID from windows then store in database and produce statistical reports later. It was working fine on my local machine till i deployed it on server to make it accessible on the intranet. The server OS is Windows 2008 Server and runs IIS. My issues are as follows,

1. The application is unable to store the user logon id from the client.
2. When more than one user uses the application, then there are errors but one user does not produce errors.

View 7 Replies

Web Forms :: Display File Is Locked Error Message When File Is Used By Another User

May 7, 2015

after i can copy my file to another folder i realised that if this webapplication is used by multiple users at once, then some users are going to get locked out because each one is trying to copy those files.

so how do i tell the user thats trying to use a file to wait untill the file is available.

StreamWriter WriterTotxt = new StreamWriter("date.txt", false);
DateTime LastAccess = File.GetLastWriteTime("path.dbf");
WriterTotxt.Write(LastAccess);
WriterTotxt.Flush();
WriterTotxt.Close();
string ReadTextFile = File.ReadAllText(txtFile);
DateTime test = Convert.ToDateTime(ReadTextFile);
if (File.GetLastWriteTime(LatestUpdatedTime).CompareTo(test) > 0)
{
File.Copy(Path.Combine(sourcefile, fName), Path.Combine(destinationfile, fName), true);
}

View 1 Replies

Access :: Website Locked - System Resource Exceeded

Feb 15, 2011

We have a web site on customer server. It is being locked every 2 or 3 months. I posted this subject before. For understanding the error I created a log file. When the server locked I look the log file and saw "system resource exceeded" error message. Have you any idea about this error.. When restarting the server it continue.

View 5 Replies

VS 2008 - Viewing ASPX Page In IFrame With IE Fails

Oct 31, 2011

A client of ours uses a home owners association website as a service. They can add pages to the site. We added a page and used an iframe in the html code to display another website which is needed. It works fine in all browsers except some copies of Internet Explorer. For example, it does not work at my home IE8 but may for others.

But here is where it gets wierd! When I try to view it in IE, it fails by just keep trying and eventually fails. Then if I past the URL it is trying in the browser by itself, it loads. Then I go back to the association website and try and it will work by loading the website in the iframe page. It does this only after I view the website url by itself in the browser.

View 3 Replies

Viewing File Using .net / To Copy/download File To Local User Machine And To Open

Nov 16, 2010

In our application, we allow user to upload documents which can be PDF, Doc, XLS, TXT. Uploaded documents will be saved on web server. We need to display link for each document user uploaded and when user click on that link, it should open relevant document. it is expected to have required software to open relevant documents.

To upload document, we use saveAs method of FileUpload control and it works absolutely fine.Now, how to view it?I believe, i need to copy/download file to local user machine and need to open it using Process.Start.For that i need to find user local temp directory. if i put path.GetTempPath(), it gives me web server directory and copy file there.

File.Copy(
sPath + dataReader["url"].ToString(),
Path.GetTempPath() + dataReader["url"].ToString(),
true);

View 4 Replies

File Gets Locked After Sent In Email?

Jul 22, 2010

I have some pdf files that get attached to emails and are emailed out through a web application. Sometimes this causes the PDF files to get locked and I cannot delete them from the server (even after the email has gone out). I get the message "The process cannot access the file 'D:myfile.pdf' because it is being used by another process".

View 6 Replies

Protect Against Unauthorized Viewing Of A Document In A Website

Mar 1, 2011

If I have a url as part of my website that points to a document:[URL]

is there any way to prevent someone from just going to that URL if they are not logged/authenticated into our site? The site has its own login username/password mechanism that was implemented where users log in.

View 1 Replies

Web Forms :: File Being Locked By A Process?

Mar 10, 2010

I'm uploading an excel file and viewing it in a grid. But if I need to upload the file again in a couple of minutes I get an error that the file is being used by another process, so I cannot upload the file again. The file is always the same name.

View 3 Replies

Prompts For Windows Authentication When Viewing A Page In Website?

Jun 17, 2010

When i try to view a PARTICULAR page in my web site, it prompts for user name and password. Irrespective of providing proper user name/password and clicking OK or directly clicking Cancel button, the page is getting loaded properly. I am not sure why the authentication screen appears!!! It happens only for that particular page. Initially I thought it could be with file permission but copy pasted another page (which works fine) and renaming it doesn't solve the problem.

EDIT

I copied the source from the browser for that particular page and saved it as HTML. When i try to open the HTML file, it prompts for authentication.

Solution

I disabled the Integrated Windows Authentication in IIS and it works fine.

View 2 Replies

Session Expired Error When Viewing Reports Using ReportViewer Web Control In SSRS 2008?

Jan 13, 2011

I am getting "ASP.NET Session Expired" error when viewing SQL Server 2008 reports using the Microsoft ReportViewer web control. I found this article http://balanagaraj.wordpress.com/2009/09/25/session-has-expired-in-asp-net/ which suggests to use one worker process in IIS application pool, but that may affect performance, is there any other solution for this? I tried setting "AsyncRendering" to false already and that didn't work.

View 2 Replies

VS 2008 - Login To A Third Party Website And Download A File

Apr 5, 2013

I have subscription to a website where I can login and download files. These files are secured so I cannot download them with a direct link. Is there any way that I login programmatically and download files from http to my server without any user involvement? They do not offer any API or interface to communicate with.

View 2 Replies

DataSource Controls :: Excel File Being Locked - Way To Unlocked It

Jun 14, 2010

I have a page where users can upload an excel file and it is read into our system. I am using the Jet.OLEDB.4.0 provider to read the files. I access the file one time to read out the header names and then allow the user to select which field each column will be read into on import. For some reason after this read the file is locked and the next time I try to access it to do the data import I get the "File in use" message. Each time I open a connection it is closed so I am not sure why the file is being locked.

View 2 Replies

Viewing File In Browser With Specified Name

Dec 13, 2013

I am viewing a file on my web page

Response.WriteFile(filepath).

In IE, if I view document properties or if I click File - send, the document name is the name of the web page - pdfviewer.pdf. How can I specify the file name, without prompting the user?

View 1 Replies

Data Controls :: Export GridView To Non Editable (Locked) Excel File

Aug 12, 2013

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Not Me.IsPostBack Then Dim dataSet1 As New DataSet dataSet1 
Dim dataSet2 As New DataSet dataSet2  Dim dataSet3 As New DataSet dataSet3

Dim dataSets As New List(Of DataSet)() dataSets.Add(dataSet1) dataSets.Add(dataSet2) dataSets.Add(dataSet3)
Dim strout As String = Server.MapPath("test1.xls") DataSetsToExcel(dataSets, strout) End If End Sub

[Code]..

How to create each excel sheet non-editable (read only)

View 1 Replies

Visual Studio :: Reassociating A Code Behind File With .aspx In 2008 Website Solution

Feb 12, 2010

I can't get my .aspx page to recognize control events in it's codebehind.

[Code]....

which is fine, but I don't want to use inline script.

[Code]....

View 6 Replies

VS 2008 - Image Format To Save With Smaller File Size After Uploading With Website?

Aug 11, 2011

I have written a website and let the user upload their photo. It also resizes the picture to 400 x 400 and crops automatically to the center part of the picture. All of this works good but each file is about 355K each for JPG and PNG file formats. I just tried GIF and it is 49K but the picture is grainy when saved this way. Is there any way I can get the picture to a smaller file size with keeping it at 400 x 400? I really thought PNG would be the way to go and was surprised by it being the same as jpg. I don't want to lower the quality either for JPG files.

View 1 Replies

Crystal Reports :: Viewing RPT File Via PDF?

Dec 15, 2010

We are operating an ERP layered architecture using SOA, developed in asp.net (c#) with the help of Nhibernate(spring ver 1.1.1.0) in Windows 2003 Server. When viewing a quite large output file we encounter an error; "ComException(0x80000237): the file size was not large enough to format the contents of an object in the report failed to export the report". We checked the ways & means to increase the temp directory in windows.

View 1 Replies

Web Forms :: Viewing A Microsoft Publisher File?

Jan 28, 2011

how to open a publisher file? I used the mime type "application/x-mspublisher" but its not working.

View 3 Replies

Access :: Protect Password In Text File From Viewing?

Nov 28, 2010

I need to preteect text file from vewing because it include usernam and password

View 1 Replies

Visual Studio 2008 - Website Running In IIS - Point The Website To Use Cassini?

Feb 7, 2010

My client gave me this web solution, in it various projects, and the problematic project (for me) is the Web Site.

I've copied the code to test web server (2008) and installed VS 2008 so I could step through the code on the server due to some weirdness.

Anyhow, when I open the solution locally on my personal computer, it runs on Cassini [URL] because I'm not on a server OS. However, when I run the app on the web server, when I hit F5, it runs oh [URL].

When I'm running the code on the server, how do I point the web site to use Cassini?

View 1 Replies

VS 2008 - Embed Body Of A Different Website Into Website

Jul 13, 2011

Is it possible to embed just the body of a different website into my website. I don't want to just add a link because I want my side menu to still be visible when the user is looking through the other websites content.

View 5 Replies

Visual Studio :: Cannot Add .mdf File To The Project In 2008 And Sql Server 2008

Mar 18, 2010

we can not add .mdf file to the project in vs2008 and sql server2008 when i am adding .mdf file its displaying an error message so it is not possible to add

View 2 Replies

VS 2008 How To Redirect From Old Website To New Website

Oct 15, 2010

I have a website which is hosted externally the primary domain is [URL]however I have since bought a new domain name [URL] which points at the same directory and default page.

I now have two problems firstly I want all traffic to come to my new domain and not the old one both users and search engines.

Secondly i have noticed in my google stats it records visits to my site as [URL] rather than the full name, again for reporting purposes it would be best if these also were reported as the full name.

I am thinking the code below added to each page on my site is the answer but wanted to check if there are any pitfalls.

If it wasnt my site wasnt hosted under the original name then I would disgard the speak-weather domain altogether.

Code:

[code]....

View 10 Replies







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