|
it
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Scripting.FileSystemObject GetFile methodOur client IIS uses NT Authentication and not anonymous.
We have XLS files in a different server than the IIS server, but both server are in the same domain with IIS. The user ids that are used are all in a group that has full control of the directory where the XLS file that we want to access (say \\myserver2\Work\myfilesFolder\). But in the ASP page when using GetFile method to get to the XLS file, it gets HTTP500 internal server error. What causes this and how to fix it ? Thank you. This is the code: sExcelPath = \\myserver2\Work\myFilesFolder\ExcelTemplate.xls Set fso = CreateObject("Scripting.FileSystemObject") Set f1 = fso.GetFile(sExcelPath) -> HTTP500 internal server error fniles wrote:
Show quoteHide quote > Our client IIS uses NT Authentication and not anonymous. First, turn off Friendly Errors in your browser so you can see the real > We have XLS files in a different server than the IIS server, but both > server are in the same domain with IIS. > The user ids that are used are all in a group that has full control > of the directory where the XLS file that we want to access (say > \\myserver2\Work\myfilesFolder\). > But in the ASP page when using GetFile method to get to the XLS file, > it gets HTTP500 internal server error. > What causes this and how to fix it ? > Thank you. > > This is the code: > sExcelPath = \\myserver2\Work\myFilesFolder\ExcelTemplate.xls > Set fso = CreateObject("Scripting.FileSystemObject") > Set f1 = fso.GetFile(sExcelPath) -> HTTP500 internal server error error message. http://www.aspfaq.com/show.asp?id=2109 -- Microsoft MVP - ASP/ASP.NET - 2004-2007 Please reply to the newsgroup. This email account is my spam trap so I don't check it very often. If you must reply off-line, then remove the "NO SPAM" If you're using "Integrated Windows Authentication" in the Directory
Security tab under authentication methods, this only allows IIS to have a security token that grants authenticated users to resources local on the IIS server itself, they won't have network access. If you remove integrated authentication, and enable only "Basic Authentication", users will be prompted with a username/password dialog box that will allow them to authenticate. Now IIS will have the complete user's credentials, and will allow them access to the network shares. Show quoteHide quote > Our client IIS uses NT Authentication and not anonymous. > We have XLS files in a different server than the IIS server, but both server > are in the same domain with IIS. > The user ids that are used are all in a group that has full control of the > directory where the XLS file that we want to access (say > \\myserver2\Work\myfilesFolder\). > But in the ASP page when using GetFile method to get to the XLS file, it > gets HTTP500 internal server error. > What causes this and how to fix it ? > Thank you. > > This is the code: > sExcelPath = \\myserver2\Work\myFilesFolder\ExcelTemplate.xls > Set fso = CreateObject("Scripting.FileSystemObject") > Set f1 = fso.GetFile(sExcelPath) -> HTTP500 internal server error > > Thank you everybody.
They now turned off the friendly message. Using "basic authentication" the fso.GetFile(sExcelPath) works fine, but they do not want to use "basic authentication" because the password is sent in clear text. So, they try to use "digest authentication for windows domain servers". When they do that, they got the following error: Microsoft VBScript runtime error '800a0035' File not found /myIntranetSite/myTest.asp, line 7 -> this is on the fso.GetFile(sExcelPath) Why "digest authentication for windows domain servers" gave the above error and how can we fix it ? Thank you again. Show quoteHide quote "Roberto Franceschetti" <roberto_remove_t***@logsat.com> wrote in message news:49fe3a29$0$11839$9a6e19ea@unlimited.newshosting.com... > If you're using "Integrated Windows Authentication" in the Directory > Security tab under authentication methods, this only allows IIS to have a > security token that grants authenticated users to resources local on the > IIS server itself, they won't have network access. If you remove > integrated authentication, and enable only "Basic Authentication", users > will be prompted with a username/password dialog box that will allow them > to authenticate. Now IIS will have the complete user's credentials, and > will allow them access to the network shares. > > -- > Roberto Franceschetti > LogSat Software > http://www.logsat.com > > > fniles wrote: >> Our client IIS uses NT Authentication and not anonymous. >> We have XLS files in a different server than the IIS server, but both >> server are in the same domain with IIS. >> The user ids that are used are all in a group that has full control of >> the directory where the XLS file that we want to access (say >> \\myserver2\Work\myfilesFolder\). >> But in the ASP page when using GetFile method to get to the XLS file, it >> gets HTTP500 internal server error. >> What causes this and how to fix it ? >> Thank you. >> >> This is the code: >> sExcelPath = \\myserver2\Work\myFilesFolder\ExcelTemplate.xls >> Set fso = CreateObject("Scripting.FileSystemObject") >> Set f1 = fso.GetFile(sExcelPath) -> HTTP500 internal server error
Show quote
Hide quote
Gazing into my crystal ball I observed "fniles" <fni***@pfmail.com> What is the physical path? Does the file indicated exist at the physical writing in news:uXd0WnozJHA.140@TK2MSFTNGP03.phx.gbl: > Thank you everybody. > They now turned off the friendly message. > > Using "basic authentication" the fso.GetFile(sExcelPath) works fine, > but they do not want to use "basic authentication" because the > password is sent in clear text. > So, they try to use "digest authentication for windows domain > servers". When they do that, they got the following error: > > Microsoft VBScript runtime error '800a0035' > File not found > /myIntranetSite/myTest.asp, line 7 -> this is on the > fso.GetFile(sExcelPath) path? > That's not an authentication error, it's a file not found error, so there > Why "digest authentication for windows domain servers" gave the above > error and how can we fix it ? is something going on there. Verify that the file exists at the specified path. -- Adrienne Boswell at Home Arbpen Web Site Design Services http://www.cavalcade-of-coding.info Please respond to the group so others can share The physical path is something like
\\myServer\Work\myCo\MyFolder\MyTemplate.xls The file does exist, and if I use "basic authentication" it work fine, we can get to the file. Only doesn't work when I use "digest authentication for windows domain servers" Show quoteHide quote "Adrienne Boswell" <arb***@yahoo.com> wrote in message news:Xns9C04478C4DC3arbpenyahoocom@207.115.33.102... > Gazing into my crystal ball I observed "fniles" <fni***@pfmail.com> > writing in news:uXd0WnozJHA.140@TK2MSFTNGP03.phx.gbl: > >> Thank you everybody. >> They now turned off the friendly message. >> >> Using "basic authentication" the fso.GetFile(sExcelPath) works fine, >> but they do not want to use "basic authentication" because the >> password is sent in clear text. >> So, they try to use "digest authentication for windows domain >> servers". When they do that, they got the following error: >> >> Microsoft VBScript runtime error '800a0035' >> File not found >> /myIntranetSite/myTest.asp, line 7 -> this is on the >> fso.GetFile(sExcelPath) > > What is the physical path? Does the file indicated exist at the physical > path? > >> >> Why "digest authentication for windows domain servers" gave the above >> error and how can we fix it ? > > That's not an authentication error, it's a file not found error, so there > is something going on there. Verify that the file exists at the > specified path. > > > > > -- > Adrienne Boswell at Home > Arbpen Web Site Design Services > http://www.cavalcade-of-coding.info > Please respond to the group so others can share > Gazing into my crystal ball I observed "fniles" <fni***@pfmail.com> Please don't top post in Usenet. Top posting corrected.writing in news:e48$Ut0zJHA.2656@TK2MSFTNGP05.phx.gbl: Show quoteHide quote > "Adrienne Boswell" <arb***@yahoo.com> wrote in message What happens if you loop through the files in that directory? Does the > news:Xns9C04478C4DC3arbpenyahoocom@207.115.33.102... >> Gazing into my crystal ball I observed "fniles" <fni***@pfmail.com> >> writing in news:uXd0WnozJHA.140@TK2MSFTNGP03.phx.gbl: >> >>> Thank you everybody. >>> They now turned off the friendly message. >>> >>> Using "basic authentication" the fso.GetFile(sExcelPath) works fine, >>> but they do not want to use "basic authentication" because the >>> password is sent in clear text. >>> So, they try to use "digest authentication for windows domain >>> servers". When they do that, they got the following error: >>> >>> Microsoft VBScript runtime error '800a0035' >>> File not found >>> /myIntranetSite/myTest.asp, line 7 -> this is on the >>> fso.GetFile(sExcelPath) >> >> What is the physical path? Does the file indicated exist at the >> physical path? >> >>> >>> Why "digest authentication for windows domain servers" gave the >>> above error and how can we fix it ? >> >> That's not an authentication error, it's a file not found error, so >> there is something going on there. Verify that the file exists at >> the specified path. >> > The physical path is something like > \\myServer\Work\myCo\MyFolder\MyTemplate.xls > > The file does exist, and if I use "basic authentication" it work fine, > we can get to the file. > Only doesn't work when I use "digest authentication for windows domain > servers" file show up that way? This is a file not found issue. -- Adrienne Boswell at Home Arbpen Web Site Design Services http://www.cavalcade-of-coding.info Please respond to the group so others can share That's a good idea.
Do you happen to have a snippet of ASP codes to loop through files in a directory ? Show quoteHide quote "Adrienne Boswell" <arb***@yahoo.com> wrote in message news:Xns9C0547969F11Barbpenyahoocom@207.115.33.102... > Gazing into my crystal ball I observed "fniles" <fni***@pfmail.com> > writing in news:e48$Ut0zJHA.2656@TK2MSFTNGP05.phx.gbl: > > Please don't top post in Usenet. Top posting corrected. > >> "Adrienne Boswell" <arb***@yahoo.com> wrote in message >> news:Xns9C04478C4DC3arbpenyahoocom@207.115.33.102... >>> Gazing into my crystal ball I observed "fniles" <fni***@pfmail.com> >>> writing in news:uXd0WnozJHA.140@TK2MSFTNGP03.phx.gbl: >>> >>>> Thank you everybody. >>>> They now turned off the friendly message. >>>> >>>> Using "basic authentication" the fso.GetFile(sExcelPath) works fine, >>>> but they do not want to use "basic authentication" because the >>>> password is sent in clear text. >>>> So, they try to use "digest authentication for windows domain >>>> servers". When they do that, they got the following error: >>>> >>>> Microsoft VBScript runtime error '800a0035' >>>> File not found >>>> /myIntranetSite/myTest.asp, line 7 -> this is on the >>>> fso.GetFile(sExcelPath) >>> >>> What is the physical path? Does the file indicated exist at the >>> physical path? >>> >>>> >>>> Why "digest authentication for windows domain servers" gave the >>>> above error and how can we fix it ? >>> >>> That's not an authentication error, it's a file not found error, so >>> there is something going on there. Verify that the file exists at >>> the specified path. >>> >> The physical path is something like >> \\myServer\Work\myCo\MyFolder\MyTemplate.xls >> >> The file does exist, and if I use "basic authentication" it work fine, >> we can get to the file. >> Only doesn't work when I use "digest authentication for windows domain >> servers" > > What happens if you loop through the files in that directory? Does the > file show up that way? This is a file not found issue. > > > -- > Adrienne Boswell at Home > Arbpen Web Site Design Services > http://www.cavalcade-of-coding.info > Please respond to the group so others can share > Adrienne Boswell wrote:
> Gazing into my crystal ball I observed "fniles" <fni***@pfmail.com> Adrienne, I frequently get "file not found" errors when there are> writing in news:uXd0WnozJHA.140@TK2MSFTNGP03.phx.gbl: >> Why "digest authentication for windows domain servers" gave the above >> error and how can we fix it ? > > That's not an authentication error, it's a file not found error, so > there is something going on there. Verify that the file exists at the > specified path. > permissions problems. You cannot dismiss permissions issues just because the message says "file not found". fmiles, if the file definitely exists in the specified location, then you definitely do not have permissions set correctly for the user accessing the website. I know you said "The user ids that are used are all in a group that has full control of the directory where the XLS file that we want to access " - all I can tell you is that this statement is not true. The user id attempting to access the file is not in the group. Verify this by putting in this line: Response.Write "user id is '" & request.servervariables("logon_user") & '" If the result is blank, make sure your website has Anonymous unchecked. -- HTH, Bob Barrows Bob Barrows wrote:
> Incidently, these need to be filesystem permissions, not website> fmiles, if the file definitely exists in the specified location, then > you definitely do not have permissions set correctly for the user > accessing the website. I know you said "The user ids that are used are > all in a group that has full control of the directory where the XLS > file that we want to access " permissions. The FileSystemObject has no exposure to the website permissions set via IIS Manager. All it knows about are the permissions set on the file system via the operating system. -- HTH, Bob Barrows Bob Barrows wrote:
> Bob Barrows wrote: Sorry, this advice only applies to files on the local server.>> >> fmiles, if the file definitely exists in the specified location, then >> you definitely do not have permissions set correctly for the user >> accessing the website. I know you said "The user ids that are used >> are all in a group that has full control of the directory where the >> XLS file that we want to access " > > Incidently, these need to be filesystem permissions, not website > permissions. The FileSystemObject has no exposure to the website > permissions set via IIS Manager. All it knows about are the > permissions set on the file system via the operating system. > -- HTH, Bob Barrows Do you suggest me checking if the request.servervariables("logon_user") has
permission to the file I am trying to access ? Thank you. Show quoteHide quote "Bob Barrows" <reb01501@NOyahoo.SPAMcom> wrote in message news:%23LBk99%23zJHA.4736@TK2MSFTNGP05.phx.gbl... > Bob Barrows wrote: >> >> fmiles, if the file definitely exists in the specified location, then >> you definitely do not have permissions set correctly for the user >> accessing the website. I know you said "The user ids that are used are >> all in a group that has full control of the directory where the XLS >> file that we want to access " > > Incidently, these need to be filesystem permissions, not website > permissions. The FileSystemObject has no exposure to the website > permissions set via IIS Manager. All it knows about are the permissions > set on the file system via the operating system. > > -- > HTH, > Bob Barrows > > No, I failed to realize you were trying to access a file on a remote
server. Look at the aspfaq article I posted in another message. fniles wrote: Show quoteHide quote > Do you suggest me checking if the > request.servervariables("logon_user") has permission to the file I am > trying to access ? > > Thank you. > > "Bob Barrows" <reb01501@NOyahoo.SPAMcom> wrote in message > news:%23LBk99%23zJHA.4736@TK2MSFTNGP05.phx.gbl... >> Bob Barrows wrote: >>> >>> fmiles, if the file definitely exists in the specified location, >>> then you definitely do not have permissions set correctly for the >>> user accessing the website. I know you said "The user ids that are >>> used are all in a group that has full control of the directory >>> where the XLS file that we want to access " >> >> Incidently, these need to be filesystem permissions, not website >> permissions. The FileSystemObject has no exposure to the website >> permissions set via IIS Manager. All it knows about are the >> permissions set on the file system via the operating system. >> >> -- >> HTH, >> Bob Barrows -- HTH, Bob Barrows Gazing into my crystal ball I observed "Bob Barrows" <reb01501
Show quoteHide quote @NOyahoo.SPAMcom> writing in news:#AQbm6#zJHA.4800@TK2MSFTNGP06.phx.gbl: Thanks, Bob. I did not know that. You would think "file not found" >>> Why "digest authentication for windows domain servers" gave the above >>> error and how can we fix it ? >> >> That's not an authentication error, it's a file not found error, so >> there is something going on there. Verify that the file exists at the >> specified path. >> > Adrienne, I frequently get "file not found" errors when there are > permissions problems. You cannot dismiss permissions issues just because > the message says "file not found". > means exactly that. You would think that if it were a permissions problem, it would say "permission denied" not "file not found". Oh well, live and learn. -- Adrienne Boswell at Home Arbpen Web Site Design Services http://www.cavalcade-of-coding.info Please respond to the group so others can share Adrienne Boswell wrote:
Show quoteHide quote > Gazing into my crystal ball I observed "Bob Barrows" <reb01501 I think the difference is, in the first place you had sufficient> @NOyahoo.SPAMcom> writing in > news:#AQbm6#zJHA.4800@TK2MSFTNGP06.phx.gbl: > >>>> Why "digest authentication for windows domain servers" gave the >>>> above error and how can we fix it ? >>> >>> That's not an authentication error, it's a file not found error, so >>> there is something going on there. Verify that the file exists at >>> the specified path. >>> >> Adrienne, I frequently get "file not found" errors when there are >> permissions problems. You cannot dismiss permissions issues just >> because the message says "file not found". >> > > Thanks, Bob. I did not know that. You would think "file not found" > means exactly that. You would think that if it were a permissions > problem, it would say "permission denied" not "file not found". Oh > well, live and learn. > permissions to locate the file but attempted to do something to it for which you have no permission. -- HTH, Bob Barrows Roberto Franceschetti wrote:
> If you're using "Integrated Windows Authentication" in the Directory I don't think that is true. You may need to read this:> Security tab under authentication methods, this only allows IIS to > have a security token that grants authenticated users to resources > local on the IIS server itself, they won't have network access. http://databases.aspfaq.com/database/why-can-t-i-access-a-database-or-text-file-on-another-server.html -- HTH, Bob Barrows Bob Barrows wrote:
> Roberto Franceschetti wrote: http://databases.aspfaq.com/database/why-can-t-i-access-a-database-or-text-file-on-another-server.html>> If you're using "Integrated Windows Authentication" in the Directory >> Security tab under authentication methods, this only allows IIS to >> have a security token that grants authenticated users to resources >> local on the IIS server itself, they won't have network access. > > I don't think that is true. You may need to read this: > > Oh wait - I misread your reply - what you said was true-- HTH, Bob Barrows
Other interesting topics
recordset.addNew
From an ASP page, is there a way write to an EXCEL file without having EXCEL installed on the IIS ma shorten the page address Listing Fields - advice needed truncated form POST type mismatch ASP (not asp.net) Prevent SQL injection error Populate Word template from ASP dynamic XLSX files from a web page |
|||||||||||||||||||||||