Thursday, 10 July 2008
|
| Pb : ASP Content Display (aspx expert) Pseudonyme 18:18:31 |
| | Hi all,
Ever had an ASP website where you cannot display webpages ?
O.S. I am using MSFT Windows Vista Pro (6000) updated with MSFT windows update today + MSFT Office 2007.
Browser I am using I.E. 7.0.6000 and Firefox 2.0.0.12
Language : French versions
..... Problem
When I search properties on REALTOR.COM I can display search results in list : http://www.realtor.com/search/searchresults.aspx?ctid=11&mnp=15&mxp=51&bd=2&bth=2&typ=10
But it is not possible to enter the detail : Exemple : First Result $85 000 1,2 Acres Charlotte, NC 28217 Property Type: Farms Farm/Ranch Property, Area: AREA 7, Subdivision: Coffey Creek, County: Mecklenburg, Approximately 1.2 acre(s) ... View details.
THAT IS NOT POSSIBLE to enter the details located at :
http://www.realtor.com/search/listingdetail.aspx?ctid=11&mnp=15&mxp=51&bd=2&bth=2&typ=10&sid=69a09a725f394ed0ba9073b4c2eb5859&lid=1055223354&lsn=1&srcnt=3
I AM ALWAYS REDIRECTED TO :
http://www.realtor.com/Errors/UnexpectedError.aspx?aspxerrorpath=/search/listingdetail.aspx
Connected from the US or from Belgium : it is the same, impossible to access the Property presentation page.
That is a main problem because RELTOR gets the exhaustive list of properties (Farms) on sale by Real Estate Agent in the U.S.
Thanks you from your answer from your k.ledge and experience.
cougloff
|
| | Add comment |
|
| ASP.NET displaying multiple serverside events to browser Andrew Stokes 12:34:01 |
| | Hi
I have a usercontrol which contains ajax toolkit controls which I am using in a SharePoint siite. When the user clicks one of the buttons on the page it fires a series of events server side (creates a new project in project server, creates an new SharePoint site ... ) each of which take quite some time. I would like to display the successful completion of each event in the control to so the user can see what progress has been made.
I am struggling to understand how I can engineer the page to perform each task in turn, post the page back after each task has occurred (to update the UI that the task has been done) then fire the next server side event. It's easy to update a control with the status changes but the updated control is only displayed to the user when all of the server side events have completed.
Can anyone help me with this?
Regards
Andrew
|
| | 2 answer | Add comment |
|
| Silverlight question to webcam support for conferencing solutions Marc 06:52:02 |
| | Dear all
have a msdn subsciption and was wondering if I can post a Silverlight question here. I was wondering if Silverlight gives webcam support like flash does this. With this, it is possible to make conferencing solutions.
As far as I read in ohter posts Silverlight 2 is not able to do this unless you use a McGyver style (http://jonas.follesoe.no/PermaLink,guid,7f8857dc-5f37-4a8a-bd35-fd4b624af45b.aspx).
Is this correct? And if yes, are there plans to implement this feature in a future release?
|
| | 2 answer | Add comment |
|
| Read Web.Config value in asp page Prasanta 04:03:58 |
| | Hello,
I have an ASP site. Now we need to define some setting on config file. on basis of that value asp page control will switch visible true or false. everything is working if I hard coded the value but only need to know how could I read the config file value in asp page.
Thanks Prasanta
|
| | 2 answer | Add comment |
Wednesday, 9 July 2008
|
| Integrated Windows authentication fails sporadically IE7 clients Guest 16:32:27 |
| | I have an intranet site on my LAN which has "anonymous access" turned OFF, and "integrated Windows authentication" turned on. This allows me to access the "AUTH_USER" server variable, which I use to look up application rights in SQL Server. With IE6 clients, this has worked flawlessly for several years.
Our users are currently running IE6, but my parent agency has announced an upgrade to IE7 beginning next month, so I have installed IE7 on a couple machines for testing. What I have observed is that the AUTH_USER variable is sporadically not available to ASP, when connecting from the IE7 client. This has the effect of prompting the user for Windows authentication when they attempt to open any page on my site. I desperately want to avoid this.
Does anyone know a) why IE7 results in the AUTH_USER variable sporadically not being available to ASP, and b) if there is anything I can configure on either client or server that will shore up this flaw?
|
| | 2 answer | Add comment |
|
| Recordset in Javascript Gtn170777 14:37:02 |
| | Hi Guys, thanks for your help yesterday, I've got one more question, then I think I'm done for now,...
Is it possible to insert recordset data in a javascript, for instance I have a javascript code that calculates the total price, depending on number of units, currently what the code does is set the price like so -
if qty 1 then 99+VAT
if qty equall to or greater than 2 and equall to or less than 9 then price = 70+VAT calculate total qty by price = total price + VAT
if qty equall to or greater than 10 and equall to or less than 19 then price = 55+VAT calculate total qty by price = total price + VAT
if qty equall to or greater thar 20 and equall to or less than 50 then price = 35+VAT calculate total qty by price = total price + VAT
See below
if((numQty >= 1) && (numQty <= 1)){document.getElementById('divPrice').innerHTML = ' ' + '99.00' + ' + VAT'; document.getElementById('maindivPrice').innerHTML = ' ' + Math.round(100*(99 * numQty))/100 + ' + VAT'; } else if((numQty >= 2) && (numQty <= 9)){document.getElementById('divPrice').innerHTML = ' ' + '70.00' + ' + VAT'; document.getElementById('maindivPrice').innerHTML = ' ' + Math.round(100*(70 * numQty))/100 + ' + VAT'; } else if((numQty >= 10) && (numQty <= 19)){document.getElementById('divPrice').innerHTML = ' ' + '55.00' + ' + VAT'; document.getElementById('maindivPrice').innerHTML = ' ' + Math.round(100*(55 * numQty))/100 + ' + VAT'; } else if((numQty >= 20) && (numQty <= 50)){document.getElementById('divPrice').innerHTML = ' ' + '35.00' + ' + VAT'; document.getElementById('maindivPrice').innerHTML = ' ' + Math.round(100*(35 * numQty))/100 + ' + VAT'; }
What I would like to do is very similar, however I have 1 price which is variable and called from a recordset, so for instance lets call the price xx
So my javascript would need to be something like this -
If qty <= 10 price = xx multipled by qty = Total Price If qty >=11 but <=20 (xx /.9) multipled by qty = Total Price If qty >=21but <=40(xx /.75) multipled by qty = Total Price If qty >=41but <=50(xx /.6) multipled by qty = Total Price
of course the code above mine also has this -
innerHTML = ' ' + '70.00' + ' + VAT' etc, so again I would need to have something like innerHTML = ' ' + 'qty <= 10 price = xx multipled by qty = Total Price/ qty..
Does anyone have any ideas? can this be done?
Thanks Gurus
|
| | 4 answer | Add comment |
|
| Show if based on session var Gtn170777 00:54:51 |
| | Hi there,
I'm trying to only show part of my page based on a variable, I have two Session Variables -
Session("EMPLOYEEMAXUSERS") Session("EMPLOYERUSERS")
Now what I'm trying to do is -
ShowIf Session("EMPLOYERUSERS") < Session("EMPLOYERMAXUSERS")
I can't get this to work though,.. Any ideas input would be really appreciated.
Thanks
|
| | 14 answers | Add comment |
|
| Stopping number exponentiation Jon 00:54:48 |
| | I want to trim a number and display the integer and decimals separately, as such I'm trying to convert it to a string so I can truncate it.
No matter what combination of int or CStr I try, VBScript displays long numbers such as:
345332523545325425235255453.6789555
in its exponentiated form:
3.45332523545325E+26
How can I stop this?
Alternatively is there a function that will separate the two for me?
|
| | 1 answer | Add comment |
Tuesday, 8 July 2008
|
| Search for a string within all asp pages in a folder? pedestrian via WebmasterKB.com 20:00:40 |
| | Is there any fast way to search for a specific string within all the files in a folder at a same time?
Thanks a lot.
-- Regards, Pedestrian, Penang.
Message posted via http://www.webmasterkb.com
|
| | 3 answer | Add comment |
|
| Adodb.Stream - Problem download big files Juan 17:04:00 |
| | Hi!
I want to use ASP to download big files using ADODB.STREAM. It works very fine with files smaller than 80 MB. On the Webserver I can see that memory allocation and the process w3wp is running. After some time (more or less 2 minutes) I get a response timeout.
Here is the code:
Server.ScriptTimeout = 30000 Response.Buffer = True
Response.Clear Response.Expires = 0 Response.ContentType = "Download-File" Response.AddHeader "Content-Disposition","attachment; filename=" & sfile
Set oStream = Server.CreateObject("ADODB.Stream") oStream.Type = adTypeBinary oStream.Open oStream.LoadFromFile(sfile) Response.AddHeader "Content-Length", oStream.Size ' -- Sch nheit Response.CharSet = "UTF-8"
For i = 0 To oStream.Size i = i + 128000 Response.BinaryWrite(oStream.Read(128000)) Response.Flush
Next
oStream.Close Set oStream = Nothing Response.Flush Response.End
Do I have to change something in my code - or perhaps a general setting in IIS / the metabase?
Many thanks in advance
Juan
|
| | 10 answers | Add comment |
|
| button click event not firing in PreRender of the updatepanel Murthy 01:19:58 |
| | Hi, i have a webpage with an updatepanel updatepanel1. i am adding controls dynamically to the updatepanel on the prerender event. i am using the prerender event as i want to get the latest bata from the database which include the data i have inserted on my last button click. But the button click event is not getting trigged on clicking the button. Here is the sample code in PreRender
SqlCommand cmd = new SqlCommand("SELECT Heading, ID FROM tblNews ORDER BY ID ;", conn); conn.Open(); SqlDataReader sqlData = cmd.ExecuteReader(CommandBehavior.CloseConnection);
while (sqlData.Read()) { lblHeading = new Label(); lblHeading.Font.Bold = true; lblHeading.Text = sqlData.GetValue(0).ToString()+"<br/>"; News.Controls.Add(lblHeading);
btnDelete = new Button(); btnDelete.ID = sqlData.GetValue(1).ToString(); btnDelete.Style.Add("float", "right"); btnDelete.Text = "Delete"; btnDelete.Click += new EventHandler(btnDelete_Click); News.Controls.Add(btnDelete); } sqlData.Close();
Can someone let me know what is the problem? How i can overcome that problem.
|
| | 1 answer | Add comment |
Monday, 7 July 2008
|
| How does a page know if it is being called by ajax? Giles 22:00:00 |
| | My web site HTML comes from a database via querystring e.g. page.asp?pid=55 I have a separate asp search page, search.asp. Its output is retrieved by an ajax call from page.asp and its HTML is then neatly wrapped and styled by page.asp. I want search.asp to recognise if it is not being called via ajax from page.asp, but directly e.g. via the address bar (and if so, redirect to page.asp). Do I need to put something into the posted string, or (better) is there an asp method that can do this? The ajax call is function GetSearchPage(st) { var poststr = "searchterm=" + encodeURI(st); makePOSTRequest('/search/search.asp', poststr,'divFullSearchDisplay'); } Thanks, Giles
|
| | 1 answer | Add comment |
Sunday, 6 July 2008
|
| Export very large excel hang IIS Newbro 02:22:35 |
| | Here's the long story short. At work we have to real-time generate a report(excel format) which involves a number of table joining. So to export into excel contentType 'application/vnd.ms-excel' is used, and data are written as table, looping each row of recordset data as table row.
Problem is when user hit export and attempt to open/save the file, file would then be downloaded at constant rate. But during this time, entire server would be irresponsive and in a hang-like state, this is expereinced by all users. When they attmept to visit another asp page they would wait until the page eventually timeout. This will continues until the report was completely generated and downloaded by users.
I'm not sure if i'm explaining myself clearly here but I appreciate all the helps I can get. Thanks.
|
| | 3 answer | Add comment |
Saturday, 5 July 2008
|
| Downloading web page from secure ASP web site. Dave the Wave 21:31:43 |
| | I work for a large chain coporation. My schedule is posted on their secure web site which I have a user name and a password for. I want to create a URL string that can be sent (using VBA inside of Outlook) which contain my username and passsword and allow me access to my schedule information.
I tried: IE.Navigate2 "https://mydish.olivegarden.com/company/TOG/home.asp?user=[myusername]&password=[mypassword]" where [myusername] and [mypassword] were replaced by the actual strings I use to login through the web site.
That doesn't work. I guessed at the variable names "user" and "password". I looked through the login pages source text for help here, but didn't find any. I also noticed the login URL has the text "...netegritysplash.asp..." in it? here is the full URL:"https://mydish.olivegarden.com/siteminder/netegritysplash.asp?TYPE=33554433&REALMOID=06-ff731848-1ef6-4793-bc06-53077be31783&GUID=&SMAUTHREASON=0&TARGET=$SM$https%3a%2f%2fmydish%2eolivegarden%2ecom%2flogin%2easp&SMIDENTITY=NO"
Can anyone tell me how piece together a URL so I can include my username and password thus directly downloading the schedule information into a VBA program without physically going to the web site using Explorer or Firefox?
Thanks in advance!
|
| | 1 answer | Add comment |
Friday, 4 July 2008
|
| Manipulating the Dreamweaver Login Behaviour Gtn170777 17:15:01 |
| | Hi Guys,
I'm using dreamweavers login behaviour to log people in, I've managed to manipulate it a little as I have many sites using the same database, but I'd like to manipulate it a little more, the behaviour so far is -
<% ' *** Validate request to log in to this site. MM_LoginAction = Request.ServerVariables("URL") If Request.QueryString <> "" Then MM_LoginAction = MM_LoginAction + "?" + Server.HTMLEncode(Request.QueryString) MM_valUsername = CStr(Request.Form("username")) If MM_valUsername <> "" Then Dim MM_fldUserAuthorization Dim MM_redirectLoginSuccess Dim MM_redirectLoginFailed Dim MM_loginSQL Dim MM_rsUser Dim MM_rsUser_cmd MM_fldUserAuthorization = "JBACASiteID" MM_redirectLoginSuccess = "jobseeker/afterlogin.asp" MM_redirectLoginFailed = "jobseeker/PasswordRequest.asp"
MM_loginSQL = "SELECT JBACAUsername, JBACAPassword, JBACASiteID" If MM_fldUserAuthorization <> "" Then MM_loginSQL = MM_loginSQL & "," & MM_fldUserAuthorization MM_loginSQL = MM_loginSQL & " FROM dbo.JBACandidate WHERE JBACAUsername = ? AND JBACAPassword = ? AND JBACASiteID = '31'" Set MM_rsUser_cmd = Server.CreateObject ("ADODB.Command") MM_rsUser_cmd.ActiveConnection = MM_recruta2_STRING MM_rsUser_cmd.CommandText = MM_loginSQL MM_rsUser_cmd.Parameters.Append MM_rsUser_cmd.CreateParameter("param1", 200, 1, 50, MM_valUsername) ' adVarChar MM_rsUser_cmd.Parameters.Append MM_rsUser_cmd.CreateParameter("param2", 200, 1, 50, Request.Form("password")) ' adVarChar MM_rsUser_cmd.Prepared = true Set MM_rsUser = MM_rsUser_cmd.Execute
If Not MM_rsUser.EOF Or Not MM_rsUser.BOF Then ' username and password match - this is a valid user Session("JOBSEEKERID") = MM_valUsername If (MM_fldUserAuthorization <> "") Then Session("SITEID") = CStr(MM_rsUser.Fields.Item(MM_fldUserAuthorization).Value) Else Session("SITEID") = "" End If if CStr(Request.QueryString("accessdenied")) <> "" And false Then MM_redirectLoginSuccess = Request.QueryString("accessdenied") End If MM_rsUser.Close Response.Redirect(MM_redirectLoginSuccess) End If MM_rsUser.Close Response.Redirect(MM_redirectLoginFailed) End If %>
You will see that at the moment I am selecting the following from the database, JBACAUsername, JBACAPassword, JBACASiteID and producing the following Sessions - Session("JOBSEEKERID") Session("SITEID") I'm then sending the browser to an afterlogin page, where I produce a recordset based on the two sessions -
<% Dim Recordset1__MMColParam Recordset1__MMColParam = "0" If (Session("JOBSEEKERID") <> "") Then Recordset1__MMColParam = Session("JOBSEEKERID") End If %> <% Dim Recordset1__MMColParam2 Recordset1__MMColParam2 = "0" If (Session("SITEID") <> "") Then Recordset1__MMColParam2 = Session("SITEID") End If %> <% Dim Recordset1 Dim Recordset1_cmd Dim Recordset1_numRows
Set Recordset1_cmd = Server.CreateObject ("ADODB.Command") Recordset1_cmd.ActiveConnection = MM_recruta2_STRING Recordset1_cmd.CommandText = "SELECT JBACASiteID, JBACAUsername, JBACAName, JBACAID FROM dbo.JBACandidate WHERE JBACAUsername = ? AND JBACASiteID = ?" Recordset1_cmd.Prepared = true Recordset1_cmd.Parameters.Append Recordset1_cmd.CreateParameter("param1", 200, 1, 255, Recordset1__MMColParam) ' adVarChar Recordset1_cmd.Parameters.Append Recordset1_cmd.CreateParameter("param2", 5, 1, -1, Recordset1__MMColParam2) ' adDouble
Set Recordset1 = Recordset1_cmd.Execute Recordset1_numRows = 0 %>
This recordset is querying the same table that was queried for the login. Following this i create the following sessions -
<%Session("JOBSEEKERNAME") = Recordset1.Fields.Item("JBACAName").Value%> <%Session("CANDID") = Recordset1.Fields.Item("JBACAID").Value%>
What I would like to do, is get all of this information in one go, rather than having to use an afterlogin page,.. is this possible?
Many thanks
|
| | 2 answer | Add comment |
Wednesday, 2 July 2008
|
| Recent round of SQL injection attacks Dave Anderson 23:35:31 |
| | We log hundreds of SQL injection attempts per day -- the type with CAST(0x44004500... AS VARCHAR(4000)). It amuses me that the last thing the attack does is DEALLOCATE its cursor. My SQL Server DBA tells me this makes no difference. So...
Are these hackers cargo cultists? Or am I missing something?
-- Dave Anderson
Unsolicited commercial email will be read at a cost of $500 per message. Use of this email address implies consent to these terms.
|
| | 1 answer | Add comment |
|
| ADOBD execute problem Baba 23:16:05 |
| | Hi, using ADODB in ASP pages we have this strange problem.
If we create an ADODB connection specifying the DNS server name instead of IP server address, then sometimes, during call to Execute method we get this error:
[Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist or access denied.
The code looks simply like:
<% Dim cn, rst
Set cn = Server.CreateObject("ADODB.Connection") cn.ConnectionString = "Driver={SQL Server};Server=sql.acme.com;Initial Catalog=SomeDB;User Id=...;Password=..." cn.Open
Set rst = cn.Execute("SELECT * FROM SomeTableWHERE ...") ...
rst.Close Set rst = Nothing
cn.Close Set cn = Nothing
%>
In my opinion, the strange things are:
1) No problem appears if we specify IP Server address 2) The problem is on the Execute and not on the cn.Open() 3) The problema appears sometimes
We tried to add a line to hosts file too, to avoid use of resolver (in the hypotesys of name server problems) but nothing changed: the error still happens randomly.
Unluckly, now we have to use the server name instead of IPAddress for the cohexistence of web and windows application from inside/outside LAN area.
Thank you in advance.
|
| | 2 answer | Add comment |
|
| How the injection worked... Old Pedant 22:38:47 |
| | Here's an example of how it was originally injected into at least one web site and thus database:
http://www.aspmessageboard.com/forum/showMessage.asp?F=21&M=894997&P=1#894984
The next post is my decoding of that and then Xander's post has a link to here: http://isc.sans.org/diary.html?n&storyid=4294 that explains the whole process even more.
|
| | 8 answers | Add comment |
|
| select query data type mismatch Guest 19:44:40 |
| | this works
sSQL = "SELECT *" & _ " FROM Expenses2008" & _ " WHERE Amount Like '%" & Request.Form("searchItem") & "%'" set rs = Connect.Execute(sSQL)
however if I enter an amount of 99 it not only gives me all entries with 99.00 in the Amount collum but 199.00, 1991.72...anything with two 9s together.
So I tried
sSQL = "SELECT *" & _ " FROM Expenses2008" & _ " WHERE Amount = '" & Request.Form("searchItem") & "'" set rs = Connect.Execute(sSQL)
But I get an error message
Microsoft JET Database Engine error '80040e07' Data type mismatch in criteria expression. /eforms/shiprec/search.asp, line 201
Can someone help me with this?
|
| | 3 answer | Add comment |
|
| How to install Enterprise Library June 2005 on server Mike Dover 18:46:04 |
| | Hi,
How does one install the June 2005 Enterprise library (for .NET 1.1) on a production windows 2003 Internet server?
My web project works in my dev environment as all installs properly there and am able to run Install Services. I've read that this is because my dev environ has vs.net. My problem is, how do I deploy an application that uses the DAAB (data access application block) of the Enterprise Library onto the production server?
Thanks, Mike
|
| | 2 answer | Add comment |
|
| Paging a recorset using a stored procedure Paolo Galli 15:21:30 |
| | hi everybody I'm trying to get this code working but I'm having problems...
I'm using Access and a query on it What I want is paging the recordset I get I can get the rs filled but I don't know how to page it... the only example I have works but only using a rs.AbsolutePage method that doesn't work with my code...
here is the snippet
'getting data connStr = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & _ Server.MapPath("test.mdb")
Set conn = Server.CreateObject("ADODB.Connection")
conn.Open connStr
Set rs = Server.CreateObject("ADODB.Recordset")
Set rs = conn.Execute ("exec q_anagrafica")
rs.PageSize = number rs.AbsolutePage = pag
While NOT rs.EOF And counter < number
response.write ( rs("id") & " - " & rs("nome") ) response.write ( "<hr>" )
rs.Movenext counter = counter + 1 WEnd
the error I'm getting is the following
Current Recordset does not support bookmarks. This may be a limitation of the provider or of the selected cursortype
if instead of the previous rc conn.execute I use the following
rs.open ("SELECT * from t_anagrafica"), conn, 3
the pagination works correctly. How can I correct the code in order to have it working with my query?
thanks a lot Paolo
|
| | 14 answers | Add comment |
|
| Serer Side Include Recordsets Gtn170777 12:36:04 |
| | Is it possible to put all recordsets in external files, reference the recordset through a server Side Include and then use the reordset to display data for instance, I have a search page that will post a value of x A search results page where the results of x are displayed, but the recordset is held on recordset1 page?
Thanks
|
| | 2 answer | Add comment |
Tuesday, 1 July 2008
|
| HTML or XML depending on client. Adam David Moss 01:33:05 |
| | All,
Suppose I have a widget A that I would like to embed in several websites B, C, and D.
Sites B and C are happy with the widget the way I've styled it but site D isn't and wants to restyle it themselves.
What would be the best way of doing this in ASP? My thoughts are that I have an ASP page that determines in a query string has been provided (issued to site D) and returns XML otherwise returns my formatted HTML.
Any advice appreciated.
Cheers,
Adam M.
|
| | 3 answer | Add comment |
Monday, 30 June 2008
|
| Classic ASP connectionstring to SQL Server 2005 Guy 15:01:10 |
| | Hi
I am supporting a classic ASP application that uses SQL Server 2000 on the backend. I now need to contect to a SQL Server 2K5 database. I currently use conntectionstring: Provider= sqloledb.1;Persist Security Info=False;User ID='XXX';Password= 'XXXX';Initial Catalog= 'XXXXX';Data Source='XXXX';Connect Timeout='25' which does not work. Is there another connectionstring I should use?
Thanks Guy
|
| | 6 answers | Add comment |
|