Wrox Programmer Forums
|
BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6
This is the forum to discuss the Wrox book ASP.NET 2.0 Instant Results by Imar Spaanjaars, Paul Wilton, Shawn Livermore; ISBN: 9780471749516
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 15th, 2008, 12:45 PM
Authorized User
 
Join Date: Feb 2008
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default error when uploading file

I have full control permissions checked off on the database and this prject still does not work. Has anybody have this problem?

Server Error in '/FileShare' Application.
--------------------------------------------------------------------------------

Failed to update database "C:\INETPUB\WWWROOT\FILESHARE\APP_DATA\FILESHAREDB .MDF" because the database is read-only.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: Failed to update database "C:\INETPUB\WWWROOT\FILESHARE\APP_DATA\FILESHAREDB .MDF" because the database is read-only.

Source Error:


Line 42: 'open the connection and execute the stored procedure
Line 43: mConnection.Open()
Line 44: mResourceID = mCommand.ExecuteScalar()
Line 45: mConnection.Close()
Line 46:


Source File: C:\inetpub\wwwroot\FileShare\App_Code\Dal\Resource DB.vb Line: 44

Stack Trace:


 
Old February 15th, 2008, 12:53 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

When you say "I" what account are you referring to? Your own account? Or the account used by the web server (if you use IIS instead of the built in web server). You may want to take a look here:

http://imar.spaanjaars.com/QuickDocId.aspx?quickdoc=395

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of Beginning ASP.NET 3.5 : in C# and VB, ASP.NET 2.0 Instant Results and Dreamweaver MX 2004
Want to be my colleague? Then check out this post.
 
Old February 15th, 2008, 01:12 PM
Authorized User
 
Join Date: Feb 2008
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default

great. Thanks. I fixed this problem but now when I try to download the file from the email. the download page does not come up it is blank. I see the directory where the file was uploaded too. For some reason my download page is blank and the dialogue box to download the file does not come up. Have you seen this problem before?

 
Old February 15th, 2008, 01:19 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

How does the download link in the e-mail look?

Imar
---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of Beginning ASP.NET 3.5 : in C# and VB, ASP.NET 2.0 Instant Results and Dreamweaver MX 2004
Want to be my colleague? Then check out this post.
 
Old February 15th, 2008, 01:31 PM
Authorized User
 
Join Date: Feb 2008
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default

A file was sent from [email protected] to [email protected]. [email protected] wanted to say:
""

click here to download:
http://localhost/SendItNow/ContentFi...?resourceID=47

Thank you!!
- the team


 
Old February 15th, 2008, 02:00 PM
Authorized User
 
Join Date: Feb 2008
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I figured it had something to do with retrieving the file because when I comment this code from the load event. the page comes up.

code:
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

        DisplayDownloadDialog(Config.ShareLocalFolderPath & _
         Resource.GetResourceFileName(Request.QueryString(" resourceID")))

End Sub

 
Old February 15th, 2008, 02:25 PM
Authorized User
 
Join Date: Feb 2008
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I pin pointed the problem but not sure how to fix it. When I replace the load event with the code below it works but it only retrieves the file with resource ID = 50:

  Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

        DisplayDownloadDialog(Config.ShareLocalFolderPath & _
         Resource.GetResourceFileName("50"))

    End Sub

 
Old February 16th, 2008, 01:28 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Are you sure there is a valid resourceID in the query string? And does that record exist in the database?

Imar
---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of Beginning ASP.NET 3.5 : in C# and VB, ASP.NET 2.0 Instant Results and Dreamweaver MX 2004
Want to be my colleague? Then check out this post.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Error while uploading large image file webnet ASP.NET 2.0 Basics 1 November 12th, 2007 09:32 AM
uploading a file MunishBhatia ASP.NET 2.0 Professional 4 May 30th, 2007 04:18 AM
Error in File Uploading Succeedor Classic ASP Basics 0 May 15th, 2007 09:13 PM
error occurs while uploading file to http://localh madhusrp ASP.NET 1.0 and 1.1 Professional 2 March 15th, 2006 11:41 AM
FIle Uploading [email protected] Classic ASP Basics 3 February 23rd, 2004 12:32 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.