| Please help with sessions |
|
 |
Index ‹ Web Programming ‹ ASP/Active Server Pages
|
- Previous
- 1
- ASP.Net >> Web Services securityHi
2000 Server IIS 5
I have a web service using anonymous access, however I need to be able to
output to a log file.
I've got a log.txt file in the same directory but I keep getting errors when
trying to write to the file, I've tried adjusting the permissions
accordingly but they don't seem to make any difference.
Any suggestions?
Thanks
Kev
- 2
- Frontpage Client >> targetting multiple frames with different contents?Is it possible to target multiple frames with different contents from one
source link.
I have two inline frames for different purpose, yet for a similar topic, how
do I target two inline frames to bring out to different contents when I
select an option from a menu?
I am using FrontPage 2003.
- 3
- ASP.Net >> redirecting a form's POST targetnot sure if that subject makes sense ;0)
I've been asked to do something I've never had to do; Create a form and
"hide" the url that it posts to. They don't want a user to be able to view
the source and see the REAL url that the form is posting to, they don't mind
if the user see "a" url, just not the actual one.
For example:
The site's URL is www.someForm.com and the form needs to post it's data to
www.someFormDatabase.com
I want to post the form to www.someForm.com then on the server side
"re-post" it to www.someFormDatabase.com
I hope you are following me, if so, does anyone have any idea how to do
this? I'm sure it's possible, I've just never needed to do it before. Any
suggestions or help very much appreciated.
Thanks for reading,
Steve
- 4
- ASP.Net >> How to reference method in usercontrolHi
I want to call a method called test() on my user control type MyControl (see below). The question is how to reference this? I tried :
(MyControl)(Panel1.FindControl("myusercontrol1")).test();
page:
<asp:panel id="Panel1" runat="server">
<TABLE id="Table1" runat ="server">
<TR>
<TD >
<uc1:myusercontrol id="myusercontrol1"runat="server"></uc1:myusercontrol>
</TD>
</TR>
</TABLE>
</asp:panel>
Thanks
Dik
**********************************************************************
Sent via Fuzzy Software @ http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...
- 5
- ASP/Active Server Pages >> ASP error in IE<%
Option Explicit
Dim RS, WRS, CRS, cst conntemp, sqltemp, SQL, CNT, MVCNT
cst = "Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source=" & Server.MapPath("\db\xxx.mdb")
set conntemp = Server.CreateObject("ADODB.Connection")
conntemp.open cst '<== Line 6
When viewing this page in IE, if I refresh the page or click on a link to another page, I
get 2 dialog boxes, one after the other, when using IE. Doesn't happen in Firefox.
"A runtime error has occured.
Do you wish to debug?
Line 6
Object required"
Then the page reacts normally, it either refreshes, or goes to the linked page.
Thanks,
MikeR
- 6
- ASP.Net >> Website security without javascript or cookiesWhat are the pitfalls of passing a token in the url once a user is
logged on so I can remember who they are?
I can easily implement this by adding &token=abcdefghijklmnop123 to
each internal link on my web pages once the user is logged on.
I won't be passing the username or password in the url, just a token
that is created when a user logs on. When the server receives the token
it maps it back to the account id. This saves the user from logging on
all the time and also means I don't rely on javascript or cookies.
I can make the token time out after ten minutes of inactivity. I could
also encrypt the client ip address in the token for further security
and check it on the server. Is this wise? How dynamic can IP addresses
be? Can a surfer's ip address change without dialing off and back in to
the isp?
My "token in the url" proposal isn't used by Amazon and that makes me
think I'm missing some security issue. Amazonseem to use cookies for
all but the secure pages and then seem to use a token in the url over a
https link for the more secure pages, which scrambles the token.
Thanks for any insights
- 7
- Frontpage Client >> Frontpage keeps running producing no error message when trying to open websiteHi,
I can open one website but not another. The other
website opens fine on another computer.
When I try to open the web on the computer that won't do
it frontpage just keeps running with a blank page and no
error message.
I've checked the hard drive, defragmented the disk, ran
detect and repair on frontpage and increased virtual
memory.
Hope someone out there has some ideas?
Thanks so much for reading.
Jerry
- 8
- 9
- ASP.Net >> DropDownList Selecting itemUsing Visual Studio.net 2003 to create an aspx web form I am having a
problem selecting an item from DropDownListBox with id= ListBoxStudies.
I can see the items from the bound database table but when I click on an item
the selected item stays at itemindex 0. What must I do to have the
itemindex change when I click on an item. What's missing from the following
code?
ListBoxStudies.DataSource = BICDataSet.Tables("protocols")
ListBoxStudies.DataTextField = "Study_name"
ListBoxStudies.DataValueField = "irb_number"
ListBoxStudies.DataBind()
I have tested this using a submit button and the _SelectedIndexchanged event
and I still always get selectedindex = 0.
Private Sub DropDownListStudies_SelectedIndexChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs)
Dim study_name As String = Session("study_name")
study_name = ListboxStudies.SelectedItem.Text
End Sub
--
Derek V. Taylor
UCI Brain Imaging Center
- 10
- ASP/Active Server Pages >> ASP Connection String for Privileged AccountI don't know if this is a unique problem, or I'm going about it the
wrong way. I currently connect to one of our SQL servers via a
priviliged account (by using RUNAS). Works with no problem. I now
need the ability to connect to the same SQL server using ASP. I have
the following connect string, but I'm not sure how to specify the
domain in the string, or is there some other way?
<%
Set demoConn = Server.CreateObject("ADODB.Connection")
demoPath="DRIVER={SQL Server};" & _
"SERVER=mysqlserver;UID=myusername;" & _
"PWD=mypassword#;DATABASE=qdb"
demoConn.open demoPath
%>
Thanks!
- 11
- ASP.Net >> remove user password that IE could cache : how ?Hello,
i have a Asp.net V2 login page with a password to enter.
In some case, a user could forget and tell IE to save its password :
How to prevent it ?
Is there a way to disable it ? to block it ?
Or could i create a button that save another text (replace) the cached
password ? the user will be prompted to click the button to remove its
cached password .... how to do it ?
Thanks a lot ...
- 12
- ASP.Net >> "Thread was being aborted" exception on redirect - VERY weird!!Hello,
I have a page that is supposed to do some checking, and if OK, set a
session variable before redirecting to another page. The following code
is a simplified version, I have hard-coded the basket ID and removed a
load of extra checking...
public partial class GoToCheckout : Page {
public void Page_Load(Object o, EventArgs e) {
try {
Session["basketid"] = "178";
//x.Text = "redirecting to PreCheckout.aspx";
Response.Redirect("PreCheckout.aspx");
} catch (Exception ex) {
Response.Redirect("/?msg=" + ex.Message);
//x.Text = "exception - " + ex.Message;
}
}
}
When this page is called, it throws a "Thread was being aborted"
exception when it hits the line...
Response.Redirect("PreCheckout.aspx");
The catch block picks it up and redirects to the home page, putting the
exception message in the querystring. I did this because if I comment
out the redirect in the catch and instead use the (commented out) x.Text
bit (x is a literal, put on the otherwise empty .aspx file for
debugging), then the redirect works fine!!
If I comment out the redirect in the try block and uncomment the x.Text
line there, then the page displays the message "redirecting to
PreCheckout.aspx" exactly as expected.
So, it seems there's some weird problem with the redirect, but I can't
work it out. Nor can I work out why changing the behaviour of the code
in the catch block changes whether the exception is raised or not.
This code has been working fine for a few months now. I have recently
been changing pages to use master pages and themes, which is when I
noticed the problem. However, if I now change this page back to not use
a master or theme, the problem is still there. I am totally baffled, and
would appreciate any help you can offer. TIA
--
Alan Silver
(anything added below this line is nothing to do with me)
- 13
- ASP.Net >> IIS x NetscapeDear friends,
How do I do to test my pages in Netspace 7.1 with IIS 5?
When I open any website, is requested an user and password. I put my Windows
XP user and password but return HTTP error 403...
How do I do to configure IIS for open web site in Netscape without
authentication?
Thank you and I'm sorry by my poor english.
RAMON ROCHA
from Brazil
- 14
- Frontpage Client >> video streamingI am using windows media encoder to stream live video.
How can I add this live stream on my web page, in a player?
The stream is http://tvministry.woomc.org:1123
How would I script this in frontpage so that viewers can access the live
stream in an embedded player on my site?
- 15
- ASP.Net >> Why does web.config get updated?I have a solution with a web service as the starting project. The web
service references other projects in the solution, which in turn access
other assemblies (some of which are in the GAC). When I run, VS2005
stuffs a bunch of assemblies (that are 2 or 3 levels removed from the
web service) into into web.config into the
configuration/compilation/assemblies.
This is really annoying. How can I turn it off?
Thanks.
|
| Author |
Message |
vman252

|
ASP/Active Server Pages >> Please help with sessions
Hi,
I am making an online quiz. I want to write the answers to
all the questions along with the user name to an output
file. Also, since there may be multiple users accessing
the quiz at the same time, I would like to use sessions.
Can someone tell me if all the answers have to be session
variables?
Thanks.
Ram
Web Programming225
|
| |
|
| |
 |
| |
 |
Index ‹ Web Programming ‹ ASP/Active Server Pages |
- Next
- 1
- Frontpage Programming >> frontpage email reply formI used the Frontpage 2003 templete for the email reply form. After I set the
properties and close the property box, I get an error message that "the
server is not configured to send emai"l. Before I published the site, I
enabled Frontpage extensions on the server.
I called the hosting company and they told me it will work with additional
programing to the form. I have no idea what additional programing needs to
be done.
Can anyone help me?
- 2
- Frontpage Client >> CREATE 'EMAIL PAGE TO A FRIEND' WEB ELEMENT:I need to create a web element which emails a web page or a URL link to a
designated email recipient. My client wants a link on her site called 'Email
this Page/Link to a Friend'. I can't find this code anywhere!
I'm sure I can figure it out or find it eventually, but some help asap would
save me a lot of time. You guys are great so thanks in advance!
--
Ruth Allen
EMBRACING TECHNOLOGY
embracingtech.com
- 3
- 4
- ASP.Net >> Javascript confirmation message in datagridHello,
I need to add a confirmation message to the Delete button in the datagrid.
I was always using this code to do this:
Private Sub dgRoles_ItemCreated(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.DataGridItemEventArgs) Handles dgRoles.ItemCreated
'------------------------------------------------------------------------------------------------
' Display delete confirmation message
'------------------------------------------------------------------------------------------------
Try
Dim BtnDel As LinkButton
Select Case e.Item.ItemType
Case ListItemType.Item, ListItemType.AlternatingItem, ListItemType.EditItem
BtnDel = CType(e.Item.FindControl("lbDelete"), LinkButton)
BtnDel.Attributes.Add("onclick", "return confirm('Are you sure you want to
remove this role?');")
End Select
Catch ex As Exception
Me.lblError.Text = "Error No.: " & Err.Number.ToString & " - " & ex.ToString
End Try
End Sub
I have used this code for years, so I know it works. But in my latest
application I'm having some problems with it.
First, the message is not always displayed, and I cannot find any pattern
when it's displayed and when it's not.
Second, even if the message is displayed correctly, no matter what button I
click - OK or Cancel - the command is executed, and the deletion occurs.
Do you have any idea where the problem might be?
I would appreciate any suggestions.
Thank you,
Peter
- 5
- ASP.Net >> Repeater and Custom HTML QuestionHello,
How to control the structure of the HTML inside of the ItemTemplate of the
Repeater?
For example, if a certain data column value is empty (or contains some
specific string or number), I want to be able to "hide" a part of the HTML
of the ItemTemplate.
Say a customer has phone number and extension. The extension is optional.
When the extension is there, the phone should be displayed in this format:
123-555-6789 Ext: 123
If there is no extension, the phone should be simply: 123-555-6789.
I have the following ItemTemplate:
<ItemTemplate>
<tr>
<td>Phone:
<%#DataBinder.Eval(Container.DataItem,"phone")%>-x<%#DataBinder.Eval(Contain
er.DataItem,"extension")</td>
</tr>
</ItemTemplate>
However, this will produce an undesirable output if there is no extension:
123-555-6788 Ext:
What is the most appropriate way to avoid this? An example would be great!
I am sure may people have come across this, since it is very common to have
"very dynamic" HTML output that is dependent on the values of the data that
is bound to the Repeater control.
Thanks,
Arsen
- 6
- Frontpage Programming >> Configuration errorCan anyone tell me what to do about this? I tried "true" and "false". Get
same error message. Thanks
Configuration Error
Description: An error occurred during the processing of a configuration file
required to service this request. Please review the specific error details
below and modify your configuration file appropriately.
Parser Error Message: It is an error to use a section registered as
allowDefinition='MachineOnly' beyond machine.config.
Source Error:
Line 11: debugging ASP.NET files.
Line 12: -->
Line 13: <compilation defaultLanguage="vb" debug="false" />
Line 14:
Line 15: <!-- CUSTOM ERROR MESSAGES
Source File: d:\webs\dsull3\genealogyweb\web.config Line: 13
- 7
- Frontpage Client >> FlagsHi,
Does anyone know what those little flags mean in the
Design mode.
The page looks fine and I can't see the problem but I am
assuming there is one.
Thanks for any help.
Stephen
- 8
- ASP.Net >> WindowsTokenRoleProvider Anyone?Hey All, I'm attempting to put together a "secure" ASP.NET 2.0
application with one requirement that has given me a bit of grief: In a
nutshell, if the user's session expires then they should be forced to
re-authenticate with the application by providing logon credentials.
These credentials are currently Active Directory domain accounts. This
is to prevent the user from walking away from their workstation and
another user walking up and accessing the application using their
perhaps still unexpired session. Yes, I know there are better ways to
enforce this kind of security but lets pretend the web app has to do it
all, 'kay?
In my experience, the easy way to implement security with domain users
is to use the Windows Authentication model built in to ASP.NET. The
problem with this is that the browser, IE6, caches any previously
supplied credentials until it is closed. So, once they log in to the app
the first time they never get prompted to do it again...even if their
session expires. Only way to clear the credential cache is to close the
browser. That won't work as it needs to be implicit. They just
carelessly walked away, remember?
So, to have the programmatic control over the authentication mechanism
seems to leave only one choice in this scenario: Forms Authentication.
Hmm, how to get Forms Auth to secure an app so that only domain users in
a given global group are permitted to log in? 2.0 Membership provider to
the rescue! Well, not exactly. "ActiveDirectoryMembershipProvider" and
"WindowsTokenRoleProvider" seem to be up to the task, but I'm hitting an
error not even the mighty Google Search can shed any light on:
[Begin Error]
Method is only supported if the user name parameter matches the user
name in the current Windows Identity.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.
Exception Details: System.Configuration.Provider.ProviderException:
Method is only supported if the user name parameter matches the user
name in the current Windows Identity.
[Clip]
Stack Trace:
[ProviderException: Method is only supported if the user name parameter
matches the user name in the current Windows Identity.]
System.Web.Security.WindowsTokenRoleProvider.GetCurrentWindowsIdentityAndCheckName(String
userName) +2182633
[End Error]
I don't know what to make of this. The error seems to imply the need for
impersonation, which would be bad if true. Problem is, even with
impersonation turned on there is still no joy (same error). Another
thought is that it wants the full domain\account syntax in the login
control. No, that just fails to authenticate entirely. It's probably
something obvious and I'm just too tired to think straight.
My implementation is straight out of MSDN AFAIKT. So, before I go down
the custom-provider road which overrides the offending method into
oblivion, does anybody have any other ideas? Thanks for reading this far!
-Lee
Here is my web.config for those patient enough to endure all this:
<!-- ***BEGIN SECURITY CONFIGURATION*** -->
<authentication mode="Forms">
<forms name=".AMSFORMSAUTH"
loginUrl="~/Logon.aspx"
defaultUrl="~/Default.aspx"
protection="All"
timeout="10"
path="/"
requireSSL="true"
slidingExpiration="true"
cookieless="UseDeviceProfile"
domain=""
enableCrossAppRedirects="false" />
</authentication>
<authorization>
<deny users="?" />
<allow roles="[The domain group for this app]" />
<deny users="*" />
</authorization>
<membership
defaultProvider="ExtranetActiveDirectoryMembershipProvider">
<providers>
<add name="ExtranetActiveDirectoryMembershipProvider"
connectionStringName="ActiveDirectoryConnectionString"
connectionUsername="[Removed domain account]"
connectionPassword="[Removed account password]"
attributeMapUsername="sAMAccountName"
type="System.Web.Security.ActiveDirectoryMembershipProvider,
System.Web, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a" />
</providers>
</membership>
<roleManager defaultProvider="ExtranetActiveDirectoryRoleProvider"
enabled="true"
cacheRolesInCookie="false">
<providers>
<add name="ExtranetActiveDirectoryRoleProvider"
type="System.Web.Security.WindowsTokenRoleProvider" />
</providers>
</roleManager>
<!-- ***END SECURITY CONFIGURATION*** -->
The connection string:
<add name="ActiveDirectoryConnectionString" connectionString="[Removed
perfectly good LDAP path to domain]" />
- 9
- Frontpage Client >> Publishing port info needed for router firewallI am using FrontPage 2000 to publish and maintain a web
site.
I have recently switched from Dial-up to DSL with an
Asante FR3004FLC router as the gateway for my home network.
I use this router because it has a very good firewall
built in to it but since installing it, I have not been
able to publish to the web site (or do a Windows update or
do an Office update, etc....).
In trouble shooting the problem, I reconfigured my system
to use the dial-up modem instead of DSL. I was able to
publish updates to the web (and do a Windows Update,
etc...). I then connected my ethernet cable directly to
the DSL modem and was able to publish the web updates (and
do a Windows Update, etc...). This told me that the
router was preventing me from publishing the web (and do a
Windows Update, etc...)when it was in the circuit.
I called Asante support and I was told that the router was
doing exactly what it was designed to do and that all I
had to do was open the ports needed by Frontpage to
publish and it would work.
I have searched the web and the Microsoft Knowledge base
for the port information and have found nothing! I have
sent a message to Microsoft Support about this issue with
no response except to say that they have received my
request and that it is in the hopper.
Does any one know what ports are used by FrontPage 2000??
Please pass the info to me via this newsgroup or directly
to me via my email.
I also need to have the same port info for Windows Update,
Office Update, and for downloading office plugins.
Thanks, Pete
- 10
- ASP.Net >> RequiredFeildValidator HELP!!Hi all,
I am using the RequiredFeildValidator on my forms, which works well when i
want to do Adding or Updating on that form, however..
If i go to that form, then try going to a different form, it won't let me
leave because those certain textboxes require info in them, even though i
only want to use those require validators for only the Adding and Updating
buttons...
what should i do????
--
AdamPC@hotmail.com
- 11
- ASP.Net >> Using Connection Class VS Connection ModuleWorking on Asp.net with access database backend,a serious Question in
the Class design phase, for accessing the database;
Which is Better to make a Connection Class that handles all the ADO
Connections for all the other Objects,
OR
Just make a Connection Module to handle the Database Access,
Wondering Which is Better and Why???? please if u have more Experience
in this Kind of "Design Issue" please Help given reasons and technical
info to support the decision,
Thanks
Sharing makes us all Better
--
Sent via .NET Newsgroups
http://www.dotnetnewsgroups.com
- 12
- ASP.Net >> Page output caching for database driven pages?What are best practices for page output caching on pages that are dynamically
generated from database tables.
Our site has left-hand navigation that is comprised of dynamically generated
menus of product categories. The categories are taken from several database
tables which rarely change.
This left-hand navigation is included on every single page in the site and
as such is wrapped up in a user-control. However, when I enabled caching on
the user-control, all DHTML and events cease to work properly.
Really confused!
Ben
However, when I tried applying
- 13
- ASP/Active Server Pages >> Menu ListHello,
I have a form page in ASP where the first menu/list function as a filter of
the second menu list. Once I select an item form the first combo I get the
second menu full of options. This is correct. My probem is that the first
combo gets the default value again and I do not see what I did choose.
I do not know if I explained this correctly. Hope someone can understand me.
Thanks a lot, Lina
- 14
- ASP.Net >> User sending email attachments?I know how to send emails using ASP.NET. How can I allow the user to attach
a file to an email that they submit (via an ASPX online submission form)?
Ex: Allow user to submit a resume along with their info.
- 15
- IIS >> Permission to use object denied (500.100 Internal Server Error)Hello,
I'm having a problem with a site that I am developing...here is the
info..any help would be great!!
Developed 4 DLLs in VB6
Running Win 2000 Pro
IIS 5
ASP accesses one of my objects and gives the error listed below. I
have other objects that work fine (and do the same thing behind the
scenes). Don't really know where to start with this one. Did a search
on google, looked for KB articles, but couldn't find anything. Thought
that permissions were correct since my other objects were working but
apparently they aren't. Even tried using anon access with the
administrator account but that behaved in the same manner. On other
thing that i get is some sort of automation error "every once in a
while" not every time...
The server is new and has not had IIS Lockdown run yet.
Thanks in advance for any help you could give!
HTTP 500.100 - Internal Server Error - ASP error
Internet Information Services
--------------------------------------------------------------------------------
Technical Information (for support personnel)
Error Type:
BenchmarkingTool (0x800A01A3)
Permission to use object denied
/BenchmarkGraph.asp, line 53
|
|
|