|
As someone said, this is a permissions error. And, it plainly is, it says so in the exception. I suggest you read my article on how to use google. If you followed the advice in that article and googled the error, you'd have found this[^].
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
yup i gotten this doc and followed it but it still didn't work. I can run from my pc but i can't run from other computer which access my webpage in my own pc. I already set all the permission for user
still have the same issue.
KaKaShi HaTaKe
|
|
|
|
|
I'm sorry, but you're wrong. The exception says it's a permissions issue, so you've plainly not fixed it. You realise the ASP.NET process runs under the ASPNET account, not the one you logged in as ?
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Yup that i have set it too. ASPNET acc but problem still same
KaKaShi HaTaKe
|
|
|
|
|
sorry bro now is this error
System.Runtime.InteropServices.COMException (0x80080005): Retrieving the COM class factory for component with CLSID {000209FF-0000-0000-C000-000000000046} failed due to the following error: 80080005
KaKaShi HaTaKe
|
|
|
|
|
Well, according to google, everyone here, and the text of your error message, you have a permissions issue.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
huh strange but i already did what ever u guys have mentioned.
just can't seem to solve the issue. i follew exactly the ink u provided me
KaKaShi HaTaKe
|
|
|
|
|
Currently i m using asp.net 2.0 with sql server 2000 database..
SqlTransaction trans = null;
try
{
trans = conn.BeginTransaction();
sqlCmd = new SqlCommand("UPDATE tble SET col1=null", conn);
sqlCmd.Transaction = trans;
sqlCmd.ExecuteNonQuery();
sqlCmd.Dispose();
trans.Commit();
Response.Redirect("NewInc.aspx");
}
catch
{
trans.Rollback();
throw;
}
while executing the above coding all executing correctly but at the time of
response.redirect , its throwing the error.. help me.
-Karan
|
|
|
|
|
what actually the error is??
Ithink You Write it InCorrectly You Write
Response.Redirect("~/NewInc.aspx");
|
|
|
|
|
the error is : This SqlTransaction has completed; it is no longer usable
and its a simple redirect page command.. but its getting error at that page.. but all executions are happening perfectly. but its not getting redirected..... guide me plz
- Karan
|
|
|
|
|
Have you tried moving the redirect outside the try/catch ?
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Are you talking about ThreadAbortException...
Both Response.Redirect and Server.Transfer creates a new Thread and terminates the Current Thread by calling Thread.Abort and redirects the Response stream to new thread. Thus It generates a First chance ThreadAbortException.
If you call
Response.Redirect(url,false)
it will not throw the first chance exception as it will skip the call to Response.End in the current thread.
so your code should be
SqlTransaction trans = null;
try
{
trans = conn.BeginTransaction();
sqlCmd = new SqlCommand("UPDATE tble SET col1=null", conn);
sqlCmd.Transaction = trans;
sqlCmd.ExecuteNonQuery();
sqlCmd.Dispose();
trans.Commit();
Response.Redirect("NewInc.aspx", false);
}
catch
{
trans.Rollback();
throw;
}
I hope this help you.
|
|
|
|
|
excellent Abhishek Sur!!
this solves my problem.....
CodeProject rocks !!
|
|
|
|
|
Hi, you can try moving trans.Rollback() and Response.Redirect("NewInc.aspx") to 'finally' block.
modified 27-May-14 5:27am.
|
|
|
|
|
I have written a code to upload data from excel to oracle database in asp.net.This code is working fine on local machine. I have hosted this code
on web server IIS 5.1 using my credentials(OS window XP SP3, so default IIS is 5.1).
Problem :
When I login on the server machine using my login id ,the application runs fine. If I try to run this application from another local machine other
than server(using same my login id) then also there is no problem. But if someone else logs in into a local machine and tried to run the application using his id then it’s not working..
This is my connection string:
OleDbConnection oledbConn = new OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;" + "Data Source=" + Label1.Text + ";" + "Extended Properties=Excel 12.0");
The code fails after oledbConn.Open(); when someone else logs in into a local machine
|
|
|
|
|
Naturally, if you told us what label1.Text was, we might have some suggestions.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Label1.Text = FileUpload1.PostedFile.FileName;
containing name and path of excel file
|
|
|
|
|
And this is supposed to find the file using the network, right ? I suspect the issue has to do with the login you're using because it has to do with permission to grab files at random across the network. OR it has to do simply with your login having the right to access files on your computer.
amittinku wrote: Label1
amittinku wrote: FileUpload1
Are you attempting to make your code as hard to read as possible ?
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
I am agreeing that issue is with some permissions.
It is web based application, any one can use it. After accessing the URL from local machine, any user can try to select excel placed in any location on his desktop. So how to do settings on IIS so that any user could do it, not just who configured IIS.
|
|
|
|
|
It's not an IIS issue. It's a network issue. Your current code will only work if you give the server access to all the computers. But you have the file data, why not write it locally and read it from there ?
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
i have not got u completely.
see code is on webseerver. we r calling from any other machine. When local machine try to access webserver, it asks for username and password, but after that does not open excel file.
I did not get "But you have the file data, why not write it locally and read it from there ? "
|
|
|
|
|
I am posting the exact error that i Got at oledbConn.Open();
Exception ex
ex.message returns "C:\Users\vikas_aggarwal01\Desktop\Kapil.xls' is not a valid path. Make sure that the path name is spelled correctly and that you are connected to the server on which the file resides."
ex.source returns " Microsoft Office Access Database Engine"
The above error comes only when another user tries to do it.
|
|
|
|
|
I tried with different user, I am getting similar error:
The Microsoft Office Access database engine cannot open or write to the file 'C:\Users\Public'. It is already opened exclusively by another user, or you need permission to view and write its data.
|
|
|
|
|
HI All My Friends..
I am trying to implement image in my Addressbar in Browser..
My Code is Below:Its Not working..
|
|
|
|
|
You have to add the .gif link also..!
try this website
http://www.html-kit.com/favicon/-/selpic-1/[^]
I think it should keep it in root folder..!
I use the below cobe to generate Fav Icon....!It may be helpful..!
<link rel="shortcut icon" href="favicon.ico">
<link rel="icon" type="image/gif" href="animated_favicon1.gif">
LatestArticle :Log4Net
Why Do Some People Forget To Mark as Answer .If It Helps.
|
|
|
|