ASPX load a page in the boy section
I have 2 ASPX files. One is the main, the other a smaller one which is the
center part of the main ASP file.
Now, how do I load the 2nd ASP into the first one? Tag: ASPX load a page in the main section Tag: 318970
Microsoft VBScript runtime error '800a004c'
I have an IIS 5.0 server with a Virtual Directory called test. This virtual
directory points to a share on the network, \\server1\share\ and uses a valid
domain account in the "Connect As" field.
From an IE browser, you can access the virtual directory without a problem.
However, when referencing the virtual diretory in an asp page, the following
error is received:
Microsoft VBScript runtime error '800a004c'
Path not found
/Folder1/webpage.asp, line 10
Line 10 is where the virtual directory is referenced.
I have tried changing the network share permission to Full access for
EVERYONE, but that did not work. I also changed the "Connect As" credentials
to an administrator account, but again without an luck. I have tested this
on two other web servers, 1 works and 1 doesn't, but I can't find any
differences in their IIS Settings.
Does anyone have any ideas?? Tag: ASPX load a page in the main section Tag: 318960
Display File in WEb Browser using ASP
Can anyone tell me how can i use ASP to display a file in the web browser?
the file is located on the server in C:\temp directory. It can be any file.
Is there any way that i can do this?
Thank you,
tim Tag: ASPX load a page in the main section Tag: 318959
Active Directory and getobject("WinNT://"
All,
I have a simple ASP web application that has been working great for
years, and now we are moving to Active Directory. The following code
is in my global.asa file, but is not working anymore. Note, although
we have upgraded to AD, the usernames have stayed the same.
Sub Session_OnStart
'**Session on Start code here **
strUsername=Replace(ucase(Request.ServerVariables("LOGON_USER")) ,
"\", "/")
set adsUser = getobject("WinNT://" & strUsername)
for each group in adsUser.groups
GrpList = GrpList & ucase(trim(group.name)) & ";"
next
if instr(GrpList ,"MYGROUP") then
Session("ok") = "OK"
else
Response.Redirect "notauthorized.htm"
end if
End Sub
Any help would be greatly appreciated!
Jeff Tag: ASPX load a page in the main section Tag: 318958
Breakpoints being ignored
Hi
I have a PC with XP SP2 and IIS 5.1 installed. I also have VS 2002 and
Interdev 6.0 installed.
I am having problems getting the system to perform JIT debugging on ASP
pages. I have enabled server side debugging on the appropriate pages in the
IIS configuration snap-in but "Stop" statements are still being ignored (on
my laptop which has a similar set-up, a stop statement results in the JIT
debugging dialog being displayed, offering me a choice of debuggers).
Can anyone think of anything obvious I am missing? Any help would be
gratefully appreciated.
Regards
--
Tim Greaves Tag: ASPX load a page in the main section Tag: 318956
QUERY: clean/tidy for Visual Studio OR ASP code
I got ASP code (VBScript mixed with HTML & Javascript) and am looking for a
clean/tidy program to clean up my code. Should I use Dreamweaver cleanup,
tool? Tag: ASPX load a page in the main section Tag: 318950
Per IP Connection Limit in XP Pro IIS 5.1
There appears to be a per IP connection limit of 2.in XP pro IIS 5.1
Is there any way of removing this limit?
When more than two ASP page requests are made from the same IP, only two are
processed while the remaining requests are queued.
This can be observed through PerfMon by watching the Requests Processing and
Requests Queue.
From a new IP, the first two requests are immediately processed and are seen
in the request processing counter. Any additionally requests increase the
request queued counter.
Even while the requests are queued, if a new IP (from another machine)
issues a request, it is immediately processed up to a maximum of two
requests. Any more end up queued.
Where is this documented and how can it be eliminated? I realize that XP
it is a workstation product. However, we are doing some simple load testing
and connection pool testing and the 2 per IP limit is skewing the numbers.
Thanks in advance. Tag: ASPX load a page in the main section Tag: 318949
ASP Calling ISAPI DLL
Hello ALL,
I have ASP pages that calls some ISAPI dll that created using Delphi for
generating reports. The report page opens fine for 1st time when invoked but
next time i get error like "Name not unique in this context."
My quesry string pass to dll like:
../ReportsDLL/NameOfDLL.dll?PatID=100578&ThpID=12&State=FL
I think after the DLL is loaded it is not freeing the memory and not
unloading the dll from memory. SO How can i free memory used by the DLL or
unload the DLL from within the ASP page that load the url to
window.location?
How can I free the objects / DLL that I loaded from the ASP page using the
above querystring?
Note: I think the delphi code that is written for DLL is working fine as It
works fine for 1st time.
Please suggest and advice.
Thanks
Prabhat Tag: ASPX load a page in the main section Tag: 318945
One line replace for multiple targets?
Writing some ASP code and I need to take a string, representing a phone
number, and strip out some characters, namely spaces, brackets and hyphens.
I could write
pNum=replace(pNum," ","")
pNum=replace(pNum,"-","")
pNum=replace(pNum,"(","")
pNum=replace(pNum,")","")
...but that's a bit of a pain. Especially since I'll be doing similar
replacements with other data and may have to strip out a larger number of
characters.
I know that this can be done with regular expressions, but all the examples
I see online are several lines in length. Isn't there a simple way to just
say "remove any of these" or "replace any of these with nothing" in a single
line of code? Tag: ASPX load a page in the main section Tag: 318944
Exporting Results from Webpage to Excel
Hi! I wanted to know if there is any possibilites to export search
results of a particular webpage to excel?
I have a website where in search for a specific criteria. After
selecting the criteria, after i click on search I would be directed to
a page where the results are displayed. Now instead if i want to have
the results exported to excel instead me taken to a results page. Is
this possible?
Can any one help me on this? I dont have any idea on programming like
HTML or Visual Basic, C or C++ anything of this sort. How can i do it
in a simple way where i can unserdtand this?
Please somebody help me in this . I need this very urgently........
Please forward the solution to me at tomslater2003@gamil.com
I would eagerly waiting for your replies folks!!!
Thanks in Advance
Tom Tag: ASPX load a page in the main section Tag: 318943
Detect Session Timeout
Hi to all
I have searched this subject and found some posts but none of them seem to
answer my problem.
I am developing a shop site and need to detect when a session times out
through inactivity and tell the user that it has been reset and he has to
start over.
I set some session variables in a global.asa file so when the user restarts
the session variables reset and I can't detect if they change.
For example
'If Session("id") <> Some kind of check'
will always return False because the check mechanism resets as well
I've tried sending an ID to a database table in the global.asa but my server
doesn't seem to handle that.
The answers given on this subject all assume that the user will enter via a
log in page. I can't arrange this on this particular site because it is only
account customers who have to log in, general punters are served pages
direct and they could enter the site anywhere.
Hope I have explained the problem well enough for you to help.
Clive Tag: ASPX load a page in the main section Tag: 318939
IIS - Crashing
I use plain old asp to code my pages with. Is there anything that would make
the entire server freeze up? There's about 500 pages of which maybe 150 call
a database for serving up the pages or updating an access database.
There's approximately 150 people accessing the pages at the same time. Not
all the database pages but using the intranet at the same time.
I'm not real familiar with IIServer so any ideas are appreciated.
Jess Tag: ASPX load a page in the main section Tag: 318938
XML Caching in Classic ASP on IIS 6.0
We have a website that reads data from Oracle and creates an XML file. Then
the site uses that file to access the info faster. On IIS5 we have no
problems, but on IIS6 we seem to have some caching issuses. This deals with
the Worker Processes. By default, there is only 1 Worker Process that gets
recycled after 1700 minutes or so. The problem is, that we will select some
data from the screen, which opens up another window to update the info. We
walk through the update process and change some data and it updates the page
fine. We can even check the XML file and it is changed, but if you choose to
go back into that data, the dropdowns will reflect whatever was initially in
the XML not the changes. If I increase the number of Worker Processes and
shorten their recycle time, this doesn't seem to be a problem, but for every
request I am generating a 25M file on the server that eventually gets
recycled. I don't want to load up the memory with useless files, but I want
our application to reflect the correct data. I really need to do this without
affecting any other possible web apps that may be on the box. Any advice? Tag: ASPX load a page in the main section Tag: 318937
ASP / SQL Problem
I think this is a ASP problem. Here is my SQL procedures my the SQL server
I can run these in SQL Query Analyzer and get the correct results. However,
when I try to run them through my ASP page, the first two do not return any
results. I can't figure out why.
SQL Statement 1. Returns all records
SQL Statement 2. Returns records after begDate
SQL Statement 3. Returns records after begDate and before endDate
SQL Statement 4. Returns records before endDate
IF EXISTS (SELECT * FROM LITDB_tblCalendar WHERE @begDate is NULL and
@endDate is NULL)
BEGIN
SELECT HrngID, AdjName, DispDueDate, ClaimNumber, Juris, HearingDate,
HearingType,
ClaimantName, Location, HearingTime, HearingPart, Counsel, DispDone,
Canceled, WasRescheduled
FROM LITDB_tblCalendar
WHERE DispDone = 0 or DispDone IS NULL
ORDER BY DispDueDate DESC
END
IF EXISTS (SELECT * FROM LITDB_tblCalendar WHERE @begDate is NOT NULL and
@endDate is NULL)
BEGIN
SELECT HrngID, AdjName, DispDueDate, ClaimNumber, Juris, HearingDate,
HearingType,
ClaimantName, Location, HearingTime, Counsel, DispDone, Canceled,
WasRescheduled
FROM LITDB_tblCalendar
WHERE DispDueDate >= @begDate and (DispDone = 0 or DispDone IS NULL)
ORDER BY DispDueDate DESC
END
IF EXISTS (SELECT * FROM LITDB_tblCalendar WHERE @begDate is NOT NULL and
@endDate is NOT NULL)
BEGIN
SELECT HrngID, AdjName, DispDueDate, ClaimNumber, Juris, HearingDate,
HearingType,
ClaimantName, Location, HearingTime, Counsel, DispDone, Canceled,
WasRescheduled
FROM LITDB_tblCalendar
WHERE DispDueDate >= @begDate and DispDueDate <= @endDate and (DispDone =
0 or DispDone IS NULL)
ORDER BY DispDueDate DESC
END
IF EXISTS (SELECT * FROM LITDB_tblCalendar WHERE @begDate is NULL and
@endDate is NOT NULL)
BEGIN
SELECT HrngID, AdjName, DispDueDate, ClaimNumber, Juris, HearingDate,
HearingType,
ClaimantName, Location, HearingTime, Counsel, DispDone, Canceled,
WasRescheduled
FROM LITDB_tblCalendar
WHERE DispDueDate <= @endDate and (DispDone = 0 or DispDone IS NULL)
ORDER BY DispDueDate DESC
END
Here is the code in ASP that corresponds
<%@ LANGUAGE="VBSCRIPT" %>
<%
FromDate = Request.Form("FromDate")
ThruDate = Request.Form("ThruDate")
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open "Provider=sqloledb;" & _
"Data Source=SQLF;" & _
"Initial Catalog=NYSA;" & _
"User Id=APP_NYSA;" & _
"Password=$NYS"
strSQL = "EXEC dbo.litDispositionsDue" & _
" @FromDate = '" & FromDate & "', " & _
" @ThruDate = '" & ThruDate & "'"
Set rs = Conn.Execute (strSQL)
%>
<form action="lstDispositionsDue.asp" method="post">
<table align=center width="85%">
<%
if not rs.eof then
rsArray = rs.GetRows()
nr = UBound(rsArray, 2) + 1
With RS
.MoveFirst
do while not .eof
%>
<tr>
<td align=center width=50>
<%
response.write "<A HREF='EditHearingNotice.asp?id=" & rs("HrngID") &
"'>"%><% =rs("HrngID") %></a></td>
<td align=center width=100><% = rs("DispDueDate") %></td>
<td align=center width=100><% = rs("ClaimNumber") %></td>
<td align=center width=200><% = rs("AdjName") %></td>
<td align=center width=100><% = rs("HearingDate") %></td>
<td align=center width=50><% = rs("Juris") %></td>
<td align=center width=175><% = rs("Location") %></td>
<td align=center width=300><% = ucase(rs("Counsel")) %></td>
</tr>
<%
.movenext
loop
end with
end if
%>
</table> Tag: ASPX load a page in the main section Tag: 318926
Using Vbscript function on Multi-select field
I am trying to use the vbscript "split" function on a multi-select
field. I am trying
to do a mass update of several records at a time.
I am getting an error and I'm not sure what to do. Here is the code if
someone could help...
strID = split(request.form("proj"), ", ")
projstat = split(request.form("rojstat"),",")
impr = split(request.form("impr"),",")
idate = split(request.form("rojinitdate"),",")
pdate = split(request.form("plancompletedate"),",")
adate = split(request.form("actualcompletedate"),",")
mdg = request.form("mgr")
myArray3 = Split(mdg,"- ")
p = ubound(myArray3)
if mdg = "Not Assigned" Then
mdgg = "Not Assigned"
else
if p = 1 then
mdgg = myArray3(0)
else
if p = 2 then
mdgg = split((myArray3(0) & "*" &
mid(myArray3(1),6)),"*")
else
if p = 3 then
mdgg = split((myArray3(0) & "*" &
mid(myArray3(1),6) & "*" &
mid(myArray3(2),6)),",")
else
if p = 4 then
mdgg = split((myArray3(0) & "*" &
mid(myArray3(1),6) & "*" &
mid(myArray3(2),6) & "*" & mid(myArray3(3),6)),",")
else
if p = 5 then
mdgg = split((myArray3(0) & "*" &
mid(myArray3(1),6) & "*" &
mid(myArray3(2),6) & "*" & mid(myArray3(4),6)),",")
end if
end if
end if
end if
end if
end if
FOR i = LBound(strID) TO UBound(strID)
mySQL = "UPDATE Roj SET rojstatus= '" & trim(rojstat(i)) & "',
importrank= '" & trim(impr(i)) & "', mgr= '" & trim(mdgg(i)) & "',
rojinitdate= '" & trim(idate(i)) & "', plancompletedate= '" &
trim(pdate(i)) & "', actualcompletedate= '" & trim(adate(i)) & "' where
(refid ='" & strID(i) & "')"
dbRroject.Execute(mySQL)
NEXT
This is the error I'm getting
Response object error 'ASP 0106 : 80020005'
Type Mismatch
/project/DMMassUpdated.asp, line 0
An unhandled data type was encountered.
Can anyone HELP? Tag: ASPX load a page in the main section Tag: 318925
ASP Calling ISAPI DLL
Hello ALL,
I have ASP pages that calls some ISAPI dll that created using Delphi for
generating reports. The report page opens fine for 1st time when invoked but
next time i get error like "Name not unique in this context."
My quesry string pass to dll like:
../ReportsDLL/NameOfDLL.dll?PatID=100578&ThpID=12&State=FL
I think after the DLL is loaded it is not freeing the memory and not
unloading the dll from memory. SO How can i free memory used by the DLL or
unload the DLL from within the ASP page that load the url to
window.location?
How can I free the objects / DLL that I loaded from the ASP page using the
above querystring?
Note: I think the delphi code that is written for DLL is working fine as It
works fine for 1st time.
Please suggest and advice.
Thanks
Prabhat Tag: ASPX load a page in the main section Tag: 318924
Unzipping component for .ASP
On Windows Server 2003, IIS 6
I am looking for an unzipping component. I have a series of files that are
available zipped at a considerable decrease in size. And before ASPINET
fails on a script timeout, I'd rather download the zip file and unzip it
when it arrives.
Any ideas on a reliable product for this on my platform?
Julian Tag: ASPX load a page in the main section Tag: 318923
Updateing a record
Whenever i try to update a record i always get the dreaded "No
permissions"
here is my updates statement. Please help.
Function updateData()
cid = Request.QueryString("wrkstaID")
sql="UPDATE work_station SET "
sql=sql & "workstation='" & Request.QueryString("workstation") & "',"
sql=sql & "cpu='" & Request.QueryString("cpu") & "',"
sql=sql & "memory='" & Request.QueryString("memory") & "',"
sql=sql & "hard_Drive='" & Request.QueryString("harddrive") & "',"
sql=sql & "servicepack='" & Request.QueryString("servicepack") & "',"
sql=sql & " WHERE work_StationID='" & cid & "'"
on error resume next
conn.Execute sql
if err<>0 then
response.write("No update permissions!")
else
response.write("Record " & cid & " was updated!")
updateData = True
end if
'conn.close
End Function Tag: ASPX load a page in the main section Tag: 318918
ASP.NET 2005 Solution Problem
I'm developing a web service that will eventually be sent to other like
organizations to communicate for a particular application. After a few
weeks, I decided it would be better to split of the web service and custome
code from the required code. In doing so, I created a class project.
This left me with a new solution of a web site and a class. I had
previously created the class seperately and added it to sourcesafe. I then
added the class to the web service project, which is where the solution was
created.
Two problems with this and sourcesafe. 1) If I add the solution and web
service to sourcesafe, the next time I open the solution from sourcesafe, the
web service no longer functions properly. It seems you can't add any
references to it and some that were there can no longer be read. 2) If I add
just the website, that works, but the next time you want to open the solution
and change part of the class and redeploy, the class does not exist, needs to
be readded, updated, etc... which is not correct.
Can anyone decipher this problem? What is the correct method to build this
type of solution and how to add it to sourcesafe? Are there any documents
out there discussing best practices in storing, creating, etc... in
sourcesafe? Tag: ASPX load a page in the main section Tag: 318910
Thesaurus & internationalisation
Hi
I am writing a web application (visual basic language) that must be
multi-national. I know that I can handle different languages using resource
files.
However, I need to extend this application to handle a Thesaurus. By this,
I mean that a user may wish to over-ride any of the words that they see with
words that they are more familiar with (or just prefer).
As an example:
Imagine an eCommerce site. If you are a regular customer you may wish to
set up a set of shopping lists, one that you access every Friday and one
that you access on the first Monday of each month. You would create these
shopping lists and then save them, giving each a unique name.
When accessing the shopping lists, there would (presumably) be a drop-down
list showing all the shopping lists that you have saved.
Besides this list would be a label which would say something like "Please
select your shopping list". This value would be saved in a resource file
and the relevant language would be chosen; so something like "Veuillez
choisir votre liste d'achats" would appear if you were French (please excuse
me if this is incorrect French - I just used http://babelfish.altavista.com/
to create it).
Now, that's all well and good, except that some people may dislike the term
"shopping list" and wish to see "order pad", or "requisition" or whatever
they think is appropriate (and the French equivalent).
I'm not sure of the best way to do this - it's got to be scalable both in
terms of performance, load and general administration.
My first thought would be to have the string (held in the resource file)
contain a place holder, so something like "Please select your ^list^" or
"Veuillez choisir votre ^list^". I would then replace ^list^ by their
preferred term (or use a default term if not specified). This term would
exist in a data base (and be held in some sort of session-cache for
performance).
I can't believe that I am the first person to need to do this sort of thing,
so I'd like to know if there is a recognised "best practice" for this sort
of thing.
Many thanks in advance
Griff Tag: ASPX load a page in the main section Tag: 318901
CDONT
Is it possible to extract from a CDONT a value that has been added to it?
e.g. can I say:
MyCDONTSMail.From="some email address"
MyCDONTSMail.To="some other email address"
MyCDONTSMail.Subject="some subject"
MyCDONTSMail.Body="some body"
And then get those values later in the program e.g.:
MailFrom = MyCDONTSMail.From
MailTo = MyCDONTSMail.To
MailSubject = MyCDONTSMail.Subject
MailBody = MyCDONTSMail.Body
Thanks! Tag: ASPX load a page in the main section Tag: 318898
Getting a CDONT parameter
My website sends automatic emails from many (25) different places. I want to
send a second email by reading the parameters of the first one. I don't want
to have to repeat and maintain the assignment of the second email
From,To,Subject fields so I am just using an include at each point in the
code where I send an email:
Set MyCDONTSMail = CreateObject("CDONTS.NewMail")
MyCDONTSMail.BodyFormat= 0
MyCDONTSMail.MailFormat= 1
MyCDONTSMail.From= fromemailaddress@whatever.com
MyCDONTSMail.To= toaddress@whatever.com
MyCDONTSMail.Subject="some subject"
MyCDONTSMail.Body= "some text":
%>
<!--#include file="SendFollowUpEmail.asp" -->
<%
MyCDONTSMail.Send
set MyCDONTSMail=nothing
-------------------------------------------------------------------------------
The SendFollowUpEmail.asp just wants to take the From,To,Subject parameters
that are defined in the original email and add a different body:
Set MyCDONTSMail2 = CreateObject("CDONTS.NewMail")
MyCDONTSMail2.BodyFormat= 0
MyCDONTSMail2.MailFormat= 1
MyCDONTSMail2.From= MyCDONTSMail.From
MyCDONTSMail2.To= MyCDONTSMail.To
MyCDONTSMail2.Subject=MyCDONTSMail.Subject
MyCDONTSMail2.Body= "some new text"
MyCDONTSMail2.Send
set MyCDONTSMail2=nothing
It chokes on this:
MyCDONTSMail2.From= MyCDONTSMail.From
Object doesn't support this property or method: 'MyCDONTSMail.From'
Seems to me MyCDONTSMail.From is only a string, why can't I retrieve its
value? More to the point though - how can I retrieve its value?
Thanks! Tag: ASPX load a page in the main section Tag: 318885
XML/ASP Help Needed
I am new to XML, but not ASP.
I have the following XML that I load via
Dim xml
Set xml = Server.CreateObject("Microsoft.XMLDOM")
xml.async = False
xml.loadXML xmldom.xml
<deals><escanoffers><escanoffer offerid="3743" itemnumber="502022"
upc="4300094509" dealamt="0.20" begindate="03/01/2006"
enddate="03/30/2006" returnby="02/28/2006" selectionlength="14"
maxretail="0.00" /></escanoffers></deals>
I need to parse it, getting all the attributes out, using ASP.
AHIA
Larry... Tag: ASPX load a page in the main section Tag: 318871
Limitation of the number of recordsets ASP is able to proceed?
Is there a limitation of the number of recordsets ASP is able to proceed?
When my Access database exceeded 544 records, only first 544 records are
shown Tag: ASPX load a page in the main section Tag: 318863
Windows NT Index Server
I have written a search logic for my website using microsoft indexing
service. I designed it on Windows XP. It works great.
Then i copied that to our Windows NT webserver and it is giving me the
following error
Microsoft VBScript runtime error '800a01ad'
ActiveX component can't create object
/search.asp, line 25
Line 25 is
Set QueryObj = Server.CreateObject("IXSSO.Query")
Please help.
Thanks. Tag: ASPX load a page in the main section Tag: 318862
Connecting to SQLEXPRESS 2005 with an ASP web app
Hello,
I have an ASP web app with an SQL back end. It's currently connecting to an
SQL Server 2000 database
using an ODBC DSN. I am currently migrating to a new Windows 2003 Server
machine and
SQL Server 2005 Express. As usual, the app doesn't connect right away, but
I've gone through all the new
Windows 2003 Server security issues and I'm able to get a normal ASP page to
display. I can also connect
to the SQLEXPRESS when I use visual studio or MS Access on a remote machine,
even using the same ODBC
DSN, but for some reason, I get an error when trying to access it though
ASP.
The error is;
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E4D)
[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user 'NT
AUTHORITY\ANONYMOUS LOGON'.
I thought that sounded like the IUSR_MachineName user not being defined in
teh db, but when I got to add that user, there is
no IUSR_MachineName account available. Does anyone else have experience with
this?
Thanks! Tag: ASPX load a page in the main section Tag: 318854
Dictionary Issue
I'm using a dictionary to record some totals, however, my first attempt
failed and I wasnt sure why...
snippet from original code:
oTotalFilters.Item(rsNetStock.fields("PartNo")) =
oTotalFilters.Item(rsNetStock.fields("PartNo") ) + CInt(iNumFilters)
After going back to the start, I eventually realised that the dictionary
Item property didn't like 'rsNetStock.fields("PartNo")' as a parameter, so I
had to use something like the following:
sTest = rsNetStock.fields("PartNo")
oTotalFilters.Item(sTest) = oTotalFilters.Item(sTest) + CInt(iNumFilters)
Am I missing something here? Surely, my original code should have worked?
Is this a known bug/feature?
Thanks
CJM
--
cjmnews04@REMOVEMEyahoo.co.uk
[remove the obvious bits] Tag: ASPX load a page in the main section Tag: 318849
XMLHTTP character issue - converting byte array to string
Hi!
I'm using Msxml2.ServerXMLHTTP.3.0 to fetch a HTML page on a remote
server. The fetched page is then parsed and the information of interest
is extracted and send to the client browser.
However, the remote server does not specify any character coding in its
headers. If using ResponseText property in ServerXMLHTTP, some
international characters are not decoded correctly. This is due to
ResponseText assuming UTF-8 coding if no character set is specified.
My solution is to use the ResponseBody property which returns the web
page as an array of unsigned bytes. I then convert the data to a string
using the ADODB.Stream method as described here:
http://www.motobit.com/tips/detpg_binarytostring/
The string is then parsed and the required information is pulled out.
This solution works just fine but I wonder if there is some more
efficient (without the need for a byte to string converion) way to
solve the problem.
BR,
Yllar Tag: ASPX load a page in the main section Tag: 318846
Cookies problem on Win2003 Eng + IIS 6.0
I have a demo app where cookies does not work.
The first page create a cookies. The second read the contet.
If I browse the pages via IE6.0 the pages does not work.
If I browse the pages via FireFox the pages work fine.
************ SetCookies.asp
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>ARXivar Test - Generazione Cookies</title>
</head>
<body>
<form name="Test" action="./SetCookies.asp" >
<strong>Pagina di generazione Cookies</strong><br><br>
<input name="GeneraCookies" type="submit" value="Genera Cookies »">
</form>
<%
If Request("GeneraCookies") <> "" Then
Response.Cookies("Nome").Path = "/"
Response.Cookies("Nome") = "Claudio"
Response.Cookies("Nome").Expires = DateAdd("h", 4, now) 'Date + 1
Response.Cookies("Cognome").Path = "/"
Response.Cookies("Cognome") = "Maccari"
Response.Cookies("Cognome").Expires = DateAdd("h", 4, now) 'Date + 1
Response.Write("Cookies generati")
Response.Write("<br><br><a href='./GetCookies.asp'>Clicca qui per leggere
il contenuto dei cookies</a>")
End If
%>
</body>
</html>
************ GetCookies.asp<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>ARXivar Test - Lettura Cookies</title>
</head>
<body>
<strong>Contenuto dei cookies:</strong><br><br>
Nome: <%=Request.Cookies("Nome")%>
<br>
Cognome: <%=Request.Cookies("Cognome")%>
</body>
</html> Tag: ASPX load a page in the main section Tag: 318845
Closing Recordsets/Connections
Is it sufficient to Set a Connection or Recordset to Nothing, or ought they
specifically be closed first?
E.g.
Set rs = oConn.Execute(sSQL)
'Do stuff
Set rs = Nothing
Set oConn = Nothing
--
cjmnews04@REMOVEMEyahoo.co.uk
[remove the obvious bits] Tag: ASPX load a page in the main section Tag: 318843
Scaling with ASP and Server Memory Issues
Hi,
I am hosting hundreds of websites on a webserver using a combination of sql
and asp.
SQL is on a different server. The web server is running win 2003 iis 6 with
a single processor and 1 GB Ram. All websites are in 1 app pool.
I find that i get out of memory errors or no new sessions are created when
the virtual bytes for an App pool starts to breach over 1500mb. So i recycle
the App pool at a limit of 1500mb.
This leads to the app pool recycling 1-2 times a day.
Typically the Private Bytes counter is saying 293mb and virtual bytes is
1438mb.
I don't know whether this is a leak somewhere in ASP or normal with IIS but
the virtual bytes only seems to increase over time and not stablise or go
down as i would expect when users visit and leave a website.
I have a script that i use to let uses download files from the server. It
uses the response.binarywrite method. If i download a large files (i.e. over
100mb) then i see a big jump in the virtual bytes that IIS allocates in the
w3wp.exe process. This does not appear to go down after the file has been
downloaded although Private Bytes goes up and then down initially. I was
thinking that this may be a cause of the problem?!
...or maybe it is typical for these types of large scale ASP applications?
Would increasing the main memory RAM to 2GB help in this situation. The main
Physical Memory still reports about 300mb free when i get the memory
problems?
Would it help to split the websites into a couple of different App Pools,
then increase the page file size to something larger and hence each App pool
gets to use a separate 2GB memory space? Would i benefit from moving to
Windows 64bit edition and installing more Ram and having a large Page file
to cope with the large Virtual Bytes?
Can anyone offer some guidance who have had similar issues with hosting
their sites?
Help much appreciated. Tag: ASPX load a page in the main section Tag: 318842
Displaying a "choose folder" dialog
Hi,
I'm asking for help because I read dozens of threads on this subject,
but I still cannot make it work.
I'm developing an ASP script (running on a SBS 2k. I'm a beginner with
ASP) to use on our intranet which does searching on our file server
using Indexing Services.
To let the users specify the scope (from which file-server folder start
to search) I need to display on client pc's (Win 2k or Win XP Pro) a
"choose folder" dialog.
I tried BrowseForFolder method, in lots of different ways, for example
(this is a copy and paste from msdn site):
------------------------------------
ssfWINDOWS = 36
set objShell = CreateObject("Shell.Application")
set objFolder = objShell.BrowseForFolder(0, "Example", 0,
ssfWINDOWS)
if (not objFolder is nothing) then
Response.write(objfolder)
end if
set objFolder = nothing
set objShell = nothing
------------------------------------
But the result is always the same: the client gets stuck (progress bar
running and nothing happens) and after a while the server stops
responding to all asp requests.
How can I do that (let the user choose a folder on fileserver) using
this or another tecnique?
Any help is greatly appreciated
Thanks in advance
Guido
Italy Tag: ASPX load a page in the main section Tag: 318840
sending ASP output to a excel file
Hi all
I have a asp page which will get the data from multiple tables (with
functions and procedures)and display data in HTML tables <TABLE> on ASP
page.
Is there any way we can create a excel file from the output of this ASP
file.
I know how to export if this information on ASP page is coming from single
query from a database table.
Any suggestions???
Thanks
mvr Tag: ASPX load a page in the main section Tag: 318833
Visual Studion Connect to Win 2003 IIS 6.0 Server is challenged
Every time developers try to connect to a Windows 2003, IIS 6.0 server they
are challenged by NT. The directory is shared and they have full rights and
can connect using Windows Explorer and Notepad.
However, they are challenged with Visual InterDev 6.0. Only the
administrator's login and password will let them in. I have re-set their
permissions several times.
Hmmmmm.
Rich Tag: ASPX load a page in the main section Tag: 318831
ASP on Win 2003 Server
My window server is going to be upgraded from Win NT 4.0 Server to Win 2003
Server. I don't know if I can put an ASP web application on this new server
without any problem. I guess ASP.NET would be better but right now I just
have a classic ASP. Can you help me about this? Or any article about this
issue would be greatly appreciated.
Thank you,
tim Tag: ASPX load a page in the main section Tag: 318829
Way to limit total number of sessions from one IP address
In trying to improve the throughput of a classic ASP app I wrote last
year, I added monitoring to the application and session start and end
methods. For one, I'm counting the total number of sessions and the
high water mark. My monitoring has revealed a few interesting things.
1. The ASP application is being shutdown and restarted almost daily.
The hosting company swears that neither the machine (shared server)
nor IIS nor the application is being restarted. Is there any other way
the Application_OnStart and _OnEnd methods might be invoked?
2. I found in the app log that apparently one invocation of the app
was being shutdown while a new one was being started; i.e. the Startup
event for the new run was logged before the Shutdown Complete event
was logged (in the same file) for the old run. How is this possible?
3. At one point, about 40 new sessions were started up from one given
IP address, with 5-10 seconds between start events being logged. Does
this happen if the user has his browser's cookies disabled? How else
might this happen (except perhaps for deliberate DoS-style hacking)?
4. Because of (3) above, I think I want to limit the number of
concurrent sessions originating from a given IP address (I already
keep an application-level array that tracks the IP addresses of all
active sessions). To be least annoying to the end user, I presume I'd
want to kill older sessions rather than not allow newer sessions (in
case of browser crashing, for example). Is there a way to kill another
session by ID, or to instruct another session to kill itself?
Thanks
tbone Tag: ASPX load a page in the main section Tag: 318828
how to open and then close a new window?
Host Environment: IIS in window 2003 server, three web servers, one load
balance, ASP (not ASP.net) code set.
Background:
There is part A codes in one asp page (page A) to open a new window (Window
B). The new window like a clock non-stop running. There is part B codes in
the page A need to close window B.
Problem:
There is no problem if the there is only one web server. It works. When
there is a load balance and more than one web server, then the window B can
not be closed.
Any help is appraciated. Tag: ASPX load a page in the main section Tag: 318823
META REFRESH
Can someone explain to me why the META Refresh doesn't work in an ASP.NET
page? It works just fine in my old asp one!
Content value has to be in quotes if not otherwise I get a warning.
Thanks
DOTNET
--------------------
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb"
Inherits="_Default" EnableSessionState="True" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>TEST</title>
<meta http-equiv="refresh" content="10" />
</head>
<body>
</body>
</html>
ASP
----------
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>TEST</title>
<META HTTP-EQUIV="REFRESH" CONTENT=10>
</head>
<body>
<div>
</div>
</body>
</html> Tag: ASPX load a page in the main section Tag: 318822
How do I check for the existence of a file?
Greetings,
I'm experimenting with an ASP page that reads data from a file name
that is passed to it as a parameter, as in this page, which works,
because the "good" file exists.
http://mazes.com/asp-maze/customized.asp?file=good&firstname=jwk
(make "your name is an amazing asp.general programmer" mazes.
But when I try this page, with the "bad" file which does not exist, I'm
not succeeding:
http://mazes.com/asp-maze/customized.asp?file=bad&firstname=jwk
I've tried several solutions that I found by googling.
When I tried:
If (ns.FileExists(zfil)<>true) then ...
but even when I give it a valid name, it returns "False"
I've tried using
On Error Resume Next
set nq=ns.OpenTextFile(Server.MapPath(zfil),1,true)
if Err.Number <> 0 Then ...
On Error Goto 0
I have found a workaround. Here is what finally worked:
On Error Resume Next
set nq=ns.OpenTextFile(Server.MapPath(zfil),1,true)
if nq.AtEndOfStream=True Then
zfil=custompath&"customdatadefault.asp"
set nq=ns.OpenTextFile(Server.MapPath(zfil),1,true)
end if
But meanwhile, I'd love to hear how to check for the existence of a
file.
John Tag: ASPX load a page in the main section Tag: 318820
copying page
Is there a way, to make a page that gets info from a DB using scripting.
then take that page, and copy it to another folder, BUT, not having the
script there. making it become all html?
so the page would contain html, but would be the result of what was
scripted.
so i guess i am saying, that the page would become the source.
i hope i am explaining myself clearly
Jeff Tag: ASPX load a page in the main section Tag: 318815
Newbie question on error checking
Hello,
I am fairly new to ASP code and need help with error checking within my
script.
Specifically, I need to check for 3 things:
1. Trap the error if the script cannot find or connect to Active Directory.
2. Trap the error if the script cannot find the requested FSM Group.
3. Trap the error if the required input file is missing or it cannot create
or edit the output file.
I have learned a little about using the Err Object (Err.number and
Err.description) but that is about it. Can anyone offer me any general
tips/tricks about how best to do this or point me to some good reference
material?
Thanks in advance,
Rich Tag: ASPX load a page in the main section Tag: 318814
Question about For-Next
Hello,
I have a simple 'For Next'-code (see at the bottom).
In the middle of the loop I want an IF-statement, which (if it is true)
jump over to next level.
I thought I could solve it through simple just writing an IF-statement
and put Next in the middle, but an error message appears.
Do you know how I can solve it?
<%
For m = 0 To Ubound(minArray,2)
If Isnull(minArray(0,m)) or minArray(0,m) = "" Then
Next
End If
Response.Write "Hello world!"
Next
%>
Thank you!
Kristoffer Tag: ASPX load a page in the main section Tag: 318812
Form post not passing data to ASP???
I have IIS server installed on XP-pro. I also have Norton Internet
Security installed.
I can run simple ASP programs without any problem. But when I use forms
with post method and call an asp in action, it does not pass any data
to ASP.
Request.Form method on a form field does not return any value.
This code works on web hosting provider server, just does not work on
my workstation with my own IIS server. Any help would be appreciated...
Here is the form code:
<html>
<head>
<title>Guestbook Form</title>
</head>
<body>
<form name="form" method="post" action="seltest.asp">
Name: <input type="text" name="name1" maxlength="20">
<input type="submit" name="Submit" value="Submit">
</form>
</body>
</html>
------------------------
Here is the ASP code:
<html>
<head>
<title>Entry Select</title>
</head>
<body bgcolor="white" text="black">
<%
Response.Write (Request.Form("name1"))
%>
</body>
</html> Tag: ASPX load a page in the main section Tag: 318800
Length of words in a string.
Hello all -
I'm really at wits end on this as I'm not having much success with locating
a function or other options I have. I'm working on a message board for a
website and I'm needing to check the length of the words that users put in.
For example, when someone puts in "yesssssssssssss!", I put together a small
function that omits all of the s's as this is wreaking havoc on the layout of
tables within the site. But I don't have a solution if someone types in
"ssss ssasdfjskldjfaskld;jfaskdf" as random ambiguous letters. I know I can
check the length of the entire string but don't know to check the words
within it.
Any help at this point is appreciated.
Thanks,
MN Tag: ASPX load a page in the main section Tag: 318790
RegExp Question
Premise: Inserting data into a database form a <textarea> and
displaying this data through an HTML page.
When inserting data into a database via a text area and then displaying
this data any carriage return that was entered into the database was
lost. I Created a function to replace a carriage return with a <BR>. I
call this function when I display this data.
If I enter text inside <> into a database and then display this data,
any text that was within the <> is lost because it is considered an
HTML tag. How can I search the string for the brackets and actually
diplay them? I do not want to use Server.HTMLEncode before I insert the
data into the database. This is because we often query the database
from outside a web browser.
Here is my function I have for the carriage return. I need to figure
out how to accomplish this for both < and >. I am sure this is simple
but I do not know what the .pattern should be (for a carriage return it
is "\r".
SET regQuote = New RegExp
regQuote.pattern = "\r"
regQuote.global = True
catchCR = regQuote.Replace(strText, "<br>")
Thanks in Advance. I will post this to an ASP and a VBScript Group. Tag: ASPX load a page in the main section Tag: 318785
URGENT| navbar
I'm paginating a recordset result with ASP
I need a navigation bar like search engines (google for example) which
display
"previous" 1 | 2 | .... | n "Next"
Queries could have hundreds of pages so I don't want to display 100+ numbers
but only a defined number, say 10 just like google does
Do you have any suggestions. Do you have any example url?
Thanks Tag: ASPX load a page in the main section Tag: 318781
ASP - Delete File Across Network - In Win 2003
Hi,
I need to delete files across the network using web client (IE 6.x) in Win
2003 - IIS 6.0 environment.
Can someone please suggest an approach I can use to acheive this.
Will using FSO do the job or I have to go COM way.
Thanks in advance.
Parag Tag: ASPX load a page in the main section Tag: 318777
ASP or ActiveX
Hi
simple question
what is faster, ASP Code or compiled ActiveX DLL with same functions(queryng
data from ms sql server)
Regards;
Mex Tag: ASPX load a page in the main section Tag: 318775
Help wrapping text around an image
I 've built a site for a client using .asp and eveything is working fine
except I cannot figure out how to wrap text around an image. Everything is
pulled from the database using response.write. The code works correctly but
I just can't seem to figure out how to do it? I've been searching for weeks
about info on how to do this - to no avail.
Can anybody offer any help?
thanx
cobyfrombrooklyn
PS the site is at www.caterdata.com/ann
and the "Featured Artists" and "About" pages are what I'm concerned with. Tag: ASPX load a page in the main section Tag: 318767
I have 2 ASPX files. One is the main, the other a smaller one which is the
center part of the main ASP file.
Now, how do I load the 2nd ASP into the first one?
>I have 2 ASPX files. One is the main, the other a smaller one which is the
>center part of the main ASP file.
>
>Now, how do I load the 2nd ASP into the first one?