|
Hello, I'm developing an webapp that uses sql authentification to am mssql server. I've created the login page which redirects to main page if succesful login. How can i restrict access to every other page in IIS?
Ex: if i tyoe http://localhost/rms it opens the login.aspx page
if i type http://localhost/main.aspx it opens the main page without auth and i don't want to
|
|
|
|
|
There are lots of things you can do. But the simplest one is
Create a BasePage which you will inherit from Page
public class BasePage : Page
in the page_load Check a session variable. Say if(Session["IsAuthenticated"] = true)...
Now inherit every page from BasePage except Login page.
If login is successful set Session["IsAuthenticated"] = true;
Hope this help you.
|
|
|
|
|
As Abhishek suggested, you need to maintin the session. When users loogs in, store user info in session variable, on every page load check session is null or not, if null , redirect to Login page. You have to clear the session on Log off.
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
I have an .asp page ,the code for which is
<@ Language=VBScript %>
<%
varEntID = request("ENTID")
vType = ucase(request("type"))
'instanciate shell starter object
set obj = server.createobject("Shellstart.Starter")
if vType = "M" then
varCommand ="e:\eadw\BIN\LogCmd.bat EAAutoLoad " & varEntID & " " & session("curmonth") & " " & "M %EADW_HOME%\LOG\" & varEntID & "AutoLoadLog.txt"
Response.Write varCommand
handle = obj.runScript(varCommand)
end if
%>
The object is registered i.e Shellstart.Starter in the webserver.
The os is windows 2003,mdac 2.7 and iis 6.0 and vbscript 5.6.0.8825
I have given full access to the virtual directory folder in IIs to evryone.
Now when i run any batch file from a vbscript,the same object is working fine but when i try to run the batch file from .asp page as given above its giving an error "ShellStart error '800a0005'
Invalid procedure call or argument
/upload_auto_do.asp, line 18
"
Please help.
|
|
|
|
|
hallo, please help as soon as possible,i face a problem to find the textbox from gridview edit template through javascript, the error message display
Error 24 The name 'ctl00_ContentPlaceHolder1_GridView1_ctl02_txtQty' does not exist in the current context
---------------------------
when using direct textbox name txtQty, same message display txtQty does not exist
i used the following code for finding value
var qty=aspnetForm.document.getElementById("<%=ctl00_ContentPlaceHolder1_GridView1_ctl02_txtQty.ClientID%>").value;
var tax=aspnetForm.document.getElementById("<%=ctl00_ContentPlaceHolder1_GridView1_ctl02_ddlTax.ClientID%>").value;
var tot=aspnetForm.document.getElementById("<%=ctl00_ContentPlaceHolder1_GridView1_ctl02_txtTotVal.ClientID%>").value;
var vattype=document.getElementById("<%=ddlVatType.ClientID%>").value;
var unitprice=aspnetForm.document.getElementById("<%=ctl00_ContentPlaceHolder1_GridView1_ctl02_txtUnitPrice.ClientID%>").value;
|
|
|
|
|
You are already sending client id as a parameter. You need to use serversideID.ClientID as parameter.
It's not necessary to be so stupid, either, but people manage it. - Christian Graus, 2009 AD
|
|
|
|
|
Hello all,
I'm Beginner to JavaScript. This Purpose: Searching word on Client side only. Not Server side. Ex: If we type "aero" on the textbox and press on Search button, the specific word (aero) must be highlighted. or must be show specifically. I wrote this script. But I'm not able to continue. please anybody can solve this?
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Air</title>
<script language="javascript">
function finding()
{
var tb=document.getElementById(findtext).value
//location.href=find.html=&ht
location.href=find.html?=ht
//var ht=location.href
ht=#tb
//ht=&#tb
}
</script>
</head>
<body>
<?php
$var=$_get['ht'];
?>
<table border="1" width="83%">
<tr>
<td width="455">Air</td>
<td> </td>
</tr>
<tr>
<td width="455"><a name=aero>aero</a></td>
<td> </td>
</tr>
<tr>
<td width="455"><a name=Business>Business</a></td>
<td> </td>
</tr>
<tr>
<td width="455">Bank</td>
<td> </td>
</tr>
</table>
<!--webbot bot="SaveResults" U-File="fpweb:///_private/form_results.csv" S-Format="TEXT/CSV" S-Label-Fields="TRUE" -->
<p><input type="text" name="T1" size="20" id="findtext"><input type="submit" value="Submit" name="B1" onclick="finding()"><input type="reset" value="Reset" name="B2"></p>
</body>
</html>
Thank you.
_Vaani_
|
|
|
|
|
Few problems that I found :
var tb=document.getElementById("findtext").value
The quotation for findtext is missing.
location.href=find.html?=ht
means the page will be redirected to find.html. So anything after this line will be neglected.
|
|
|
|
|
Hello,
I have a DLL file which I use in windows app by creating its object as below,
Dim Obj as new <DLLName>.<InterfaceName>
this works in windows App
Now when I am trying to create object in VBScript, it is not creating.
The Code is :
Set Obj = CreateObject("<DLLName>.<InterfaceName>")
Can somebody tell me why it is not working.
Thanks in Advance.
|
|
|
|
|
Hi, i need to write a code that would try catch any sudden javascript error in the whole application. i do not want to write the try catch in every single page, is this doable??if so how can i do it??
|
|
|
|
|
I'm not sure if there is anything to catch errors globally - but you can simply surround the contents of each of your functions in a try catch statement - or better still a function calling error handling function. Something like:
<script>
my_function(){
//function code here
}
my_error_handling(e){
alert(e);
}
call_my_function(){
try{
my_function();
} catch exception (e){
my_error_handling(e);
}
}
call_my_function();
</script>
Then include the script and change it to call any function passed to it.
|
|
|
|
|
yeah i know, but i do not want to catch them pieces by pieces as you said i want to catch them globally so i would prevent any javascript error that suddenly appears in my application.
|
|
|
|
|
|
Hello all,
I have developed a Web Application on my local machine.
Now, i am trying to access that application on different machine which is connected in LAN with my machine, but i am unable to access it.
I searched on net, they are saying its because of settings in IIS.
What changes should i make in my IIS setting so that my application is accessible to other machines?
I even tried by turing off the windows firewall of other machine as mentioned in a forum but it didn't work.
Can anybody help me?
Thanks,
Nagendra.
modified on Wednesday, September 23, 2009 7:56 AM
|
|
|
|
|
hi
try to check the antivirus software it might block the traffic , if u r using norton internet security or symantic try to disable it.
or try to browse u r to share a folder and view it from defferent computer in the lan ,if you cant access the pc check work group names good luck !!!
|
|
|
|
|
i disabled the antivirus firewall, tis still not working.
I can access my pc on LAN but not my web application.
|
|
|
|
|
ok
try to reset iis by start-run- type iisreset.
if it doesnt work restart the computer and if it doesnt work throw it from the window
may be its a permission issue !!!
|
|
|
|
|
I am getting a message as "Access is denied by ACL on resource".
How can i change my ACL access?
|
|
|
|
|
Its solved, i just configur IIS user for my application.
|
|
|
|
|
Hopeully someone will be able to help here - google not proving to be much use!
I have an asp.net web site, for which I've coded up an Export dll to call and run SSIS packages on the server. This was essentially achieved by referencing the DLL mentioned above in its location in SQL Server directory. This was fine on my dev box (32 bit) and on the first server we deployed to (32 bit), but now I'm gettg a BadImageFormat exception on a new server we've deployed to (64 bit).
I'm on board with the problem being 32 vs 64 bits, but no idea how to solve it. We'd be reluctant to do separate 32bit and 64 bit builds, but if that's the way to go, then so be it, but what I'd really like is to somehow create a single version for both.
It appears that the dll itsef does exist on the 64 bit server, but in Program files (x86), rather than Program Files - is there a way to specify the location using a config file or something similar? Or is there a way of "forcing" use of32 bit dll?
God I hope SOMEONE can help!....
C# has already designed away most of the tedium of C++.
|
|
|
|
|
hi,
i have many text boxes on my web page,
how can i get which text box is focused.
Thank You
|
|
|
|
|
why dont you think simply...
use onfocus event to set the object into javascript variable.
var focussedinput = null;
myinput.focus = function(this){
focussedinput = this;
};
You can also define this in
<input onfocus="javascript:focussedinput = this">
You can now get the values from any function by just calling elem.
|
|
|
|
|
I am Sending the mails from Postcast server,
it allows me to send 5 to 8 mails
but after that it shows error that you are blocked
i.e your ip address is blocked.
please tell me that is there any particular format for sending mails through these severs.
All the mails i send are sent to SPAM box in email account.
Is that so, that i can send only SPAM mails through it or to inbox somehow, if not so then what format of SPAM to follow to prevent from Blocking...
please give details..
please help..its related to my project
|
|
|
|
|
|
Hello,
Question: Is it possible to use a web service as a proxy to a different web service on another web server? Due to desired web service running outside of the zone and possibly having to go through a firewall (launching web server accesses two networks with one being in the DMZ). If this is possible, is there any articles in MSDN that can assist in setting up the intermediate service to send a request to the primary service?
Thanks,
Leo T. Smith
Program/Analyst Supervisor
|
|
|
|