|
Any reason why you are not storing the credentials in a cookie?
If you set an expiration for a cookie, it will get saved to the user's computer, but if you don't set an expiration there is no way (that I know of) that the cookie can ever be seen by a user.
|
|
|
|
|
I am sending the request to a third party payment processing site. Unfortunately I have no control over their servers
|
|
|
|
|
I'm using Visual Studio 2005 and SQL Server 2005 on a Windows Server 2003 operating system. I'm trying to print Reporting Services Reports dirctly to the printer without using the Report Manager to preview. I'm using some VB.NET code that was posted here at the following location:
http://www.codeproject.com/vb/net/RSPrintLandscape.asp
I have an ASP.NET application that I'm running on a local machine to locate and print reports from a remote report server on another machine. The application downloads a report in PDF format and creates a file on my local machine successfully, but when it tries to write to the file I get the following error:
***********************************************************************
Server Error in <myappname> Application.
Access to the path 'C:\TEMP.PDF' is denied.
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.UnauthorizedAccessException: Access to the path 'C:\TEMP.PDF' is denied.
ASP.NET is not authorized to access the requested resource. Consider granting access rights to the resource to the ASP.NET request identity. ASP.NET has a base process identity (typically {MACHINE}\ASPNET on IIS 5 or Network Service on IIS 6) that is used if the application is not impersonating. If the application is impersonating via <identity impersonate="true">, the identity will be the anonymous user (typically IUSR_MACHINENAME) or the authenticated request user.
To grant ASP.NET access to a file, right-click the file in Explorer, choose "Properties" and select the Security tab. Click "Add" to add the appropriate user or group. Highlight the ASP.NET account, and check the boxes for the desired access.
Source Error:
Line 256: WebFile.Credentials = CredentialCache.DefaultCredentials
Line 257: 'Create the local file
Line 258: LocalFile = New FileStream(DestFilename, FileMode.Create)
Line 259:
Line 260: 'Download the file in 16k chunks
Source File: C:\Projects\ICISMainReport2\PrintDirect.aspx.vb Line: 258
Stack Trace:
[UnauthorizedAccessException: Access to the path 'C:\PRINT_TEMP.PDF' is denied.]
System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +2013027
System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy) +998
System.IO.FileStream..ctor(String path, FileMode mode) +65
PrintDirect._PrintDirect.DownloadWebFile(String URL, String DestFilename) in C:\Projects\ICISMainReport2\PrintDirect.aspx.vb:258
PrintDirect._PrintDirect.btnPrint_Click(Object sender, EventArgs e) in C:\Projects\ICISMainReport2\PrintDirect.aspx.vb:207
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +105
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +107
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102
******************************************************************************
I considered the suggestion that was listed with the error message but please note that this file is created on the user's machine each time the application is run. How can I control permissions for a file on each user's machine?
Any suggestion how I might overcome this problem?
Thanks
RickyZX
|
|
|
|
|
Hello all,
Sub: Duplicate Mails - Generated on press of Refresh button in Browser.
HOW TO VALIDATE THIS IN ASP not ASP.NET.
We created a application code using asp vb script which sent mail with attachment once the people proceeds for order.
The problem we are facing is we are getting duplicate mail after once we refresh the confirm button.
so we are getting more mails when ever we refresh the pages. This should be stopped.
Please advice.
Thanks and Regards,
kris
If you fail for the first time , call it version 1.0.
|
|
|
|
|
krishna19 wrote: HOW TO VALIDATE THIS IN ASP not ASP.NET.
So why post it here ? It belongs in 'web development'.
krishna19 wrote: so we are getting more mails when ever we refresh the pages. This should be stopped.
I'm sure it should. Your code to send email is obviously being run more than once. No-one can comment further without seeing the code, and the code should be seen in the web dev forum, not here.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
I have the following connection in my webconfig file:-
<add name="Conn" connectionString="Data Source=C:\inetpub\wwwroot\quetzal_system\equipment.mdb" providerName="Microsoft.Jet.OLEDB.4.0"/>
Can someone just check it's correct never done one only sql.
|
|
|
|
|
|
Sorry about the couple of closley related Q's thisafternoon... but I'm just getting to grips with atlas.
Is it possible/feesable/sensible to have a master page and load all its content pages sans-postback, Atlas style.
As the site im working on only has 2 pages and a master.
1 page uses Atlas and an XML control and XSL to mimic being 3 or 4 pages that are totaly generated from database queries.
The second does not and having that one page that posts backs kind of upsets the seemless feel i want... I thought of making the second page a custom control on the first page hiding and revealing it inside an update panel when needed but that seems an awefuly clunky way of doing it.
Any ideas?
Thanks.
|
|
|
|
|
Under fire fox the masterpage does not even flicker... under IE there is an ugly refresh on the master page when navigating to pages still under the same master page.
All my graphics have been optimised and saved in super lean formats using photoshops "Save For Web" feature .. yet still IE7 gives this ugly refresh on the master page.
Any ideas?
Thanks.
|
|
|
|
|
I think that you are confusing master pages with framesets. A master page is only a tool on the server to separate contents. The entire page is created for every request, not just the contents from the aspx file.
---
b { font-weight: normal; }
|
|
|
|
|
No i understand the master page to that extent(see my above question about geting the master to load the contents via ajax to counter this very point).
But under fire fox there is no "flicker" during loading of any of the pages... the master page stays (seemingly) un altered/un-re-loading while the content updates...
Under IE7 there is a nasty and pronounced flicker of the whole page
|
|
|
|
|
Yes, that is what happens when you load a page in the browser. The browsers just work differently.
---
b { font-weight: normal; }
|
|
|
|
|
I also know that... BUT there have been plenty of work arounds or "cross-browser" solutions to certain "quirks" of some browsers.
And that was what I was looking for with regards IE7 and masterpages.
|
|
|
|
|
The only work around for the flickering caused by reloading the page would be to update the page without reloading the page.
---
b { font-weight: normal; }
|
|
|
|
|
I have a BoundColumn which shows a Date.In the Sql server database i have Null value, but in the datagrid i see 1/1/0001 12:00:00 AM .Do you know what the cause might be?
If it has any relevance, the datagrid source for the boundcolumn is a LLBLGen Collection.
Thank you.
|
|
|
|
|
You can convert that into date only and then display it in the datagrid.
Best Regards,
Apurva Kaushal
|
|
|
|
|
K.I'll do it in ItemDataBound.
-- modified at 9:29 Tuesday 19th September, 2006
|
|
|
|
|
You can change the date format while retriving on the query itself. Like conver as Varchar.
Ram
|
|
|
|
|
Hi, can anyone please tell me how to create an excel spreadsheet in asp.net application, with the ability to store multiple datatables/datasets in the same worksheet. Doesn't matter if it's automatic or if I manually have to set each cell's value, headers etc.
And finally prompt the user to save(download) the file.
Thanx
Regards,
Tintin
|
|
|
|
|
|
Nope, unfortunately not. I'm looking for something similar to what www.spreadsheetgear.com provides. Only thing is it's not freeware.
Their code enables you to build spreadsheets and allow download.
Regards,
Tintin
|
|
|
|
|
Artical in Codeproject.
Delivering Spreadsheet Capabilities Across Platforms
http://www.codeproject.com/showcase/farpoint.asp[^]
Go through this. And think how you can use the knowledge you accquried to accomplish your task.
Hope this helps,
Best regards,
-- modified at 9:50 Tuesday 19th September, 2006
|
|
|
|
|
How can I show popup message when session time out in ASP.NET 2.0 ?
Best Regards...
|
|
|
|
|
|
This article related about popup windows.
I need just show message when session time out.
Best Regars
|
|
|
|