|
what does your web.config file say?
|
|
|
|
|
Irrelevant
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Hi
can you please refer to below config file -
<?xml version="1.0"?>
<configuration>
<configSections>
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler,log4net"/>
<section name="enterpriselibrary.configurationSettings" type="Microsoft.Practices.EnterpriseLibrary.Configuration.ConfigurationManagerSectionHandler, Microsoft.Practices.EnterpriseLibrary.Configuration, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" />
</configSections>
<log4net>
<appender name="RollingFile" type="log4net.Appender.RollingFileAppender">
<file value="Logs/Valuations.log"/>
<appendToFile value="true"/>
<rollingStyle value="Date"/>
<datePattern value="yyyyMMdd"/>
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date [%thread] %-5level %logger. %M - %property{user} - %message%newline"/>
</layout>
</appender>
<appender name="SmtpAppender" type="log4net.Appender.SmtpAppender">
<to value=""/>
<from value="BarracudaFrontEnd@us.hsbc.com"/>
<subject value="BarracudaFrontEnd Error Warning"/>
<smtpHost value="nysuntrade03"/>
<bufferSize value="512"/>
<lossy value="true"/>
<evaluator type="log4net.Core.LevelEvaluator">
<threshold value="ERROR"/>
</evaluator>
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date [%thread] %-5level %logger.%M - %property{user} - %message%newline"/>
</layout>
</appender>
<root>
<level value="DEBUG"/>
<appender-ref ref="RollingFile"/>
</root>
</log4net>
<enterpriselibrary.configurationSettings xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" applicationName="Application" xmlns="http://www.microsoft.com/practices/enterpriselibrary/08-31-2004/configuration">
<configurationSections>
<configurationSection xsi:type="ReadOnlyConfigurationSectionData" name="dataConfiguration" encrypt="false">
<storageProvider xsi:type="XmlFileStorageProviderData" name="XML File Storage Provider" path="dataConfiguration.config" />
<dataTransformer xsi:type="XmlSerializerTransformerData" name="Xml Serializer Transformer">
<includeTypes />
</dataTransformer>
</configurationSection>
</configurationSections>
<keyAlgorithmStorageProvider xsi:nil="true" />
<includeTypes />
</enterpriselibrary.configurationSettings>
<appSettings>
<add key="entities" value="HBUS-New York,HBEU-London,HBFR-Paris,HBFP-Paris,HBAP-Hong Kong" />
<add key="sftpAddressRecords" value="5" />
<add key="DefaultDate" value="2003-09-01" />
<add key="ServerName" value="UAT" />
<add key="disableSimultaneousLogins" value="Y" />
<add key="senttoDMLservletPath" value="http://136.50.107.141:9080/dev/approvedOrCancelledAction.do"/>
<add key="approverejecttltproc" value="GVS_TLT_PKG.APPROVE_REJECT_TL" />
<add key="tlt_delete_proc" value="GVS_TLT_PKG.PROC_SUBMIT_TLT_DELETE" />
<add key="approverejectclientproc" value="GVS_CLIENTPROFILES_PKG.ApproveRejectClient" />
<add key="Environment" value="QA"/>
<add key="ServletCommTimeout" value="9000"/>
<add key="RevisedTradeColor" value="#faa5a0" />
<add key="UnMatchedTraderTicketColor" value="#ffffff" />
<add key="CancelledTraderTicketColor" value="#cdcdcd" />
<add key="AllocatedTraderTicketColor" value="#ffff64" />
<add key="MatchedTraderTicketColor" value="#99ff99" />
<add key="TradertoTrader_StreetTradeColor" value="#F4A460" />
<add key="MAPagingDifference" value="50" />
<add key="PagingDifference" value="50" />
<add key="frequencies" value="DAILY,WEEKLY,FORTNIGHTLY,MONTHLY,QUARTERLY,SEMIANNUALLY,ANNUALLY,RANDOM,EOM,EOQ,EOHY" />
<add key="InclExclPagingDifference" value="100" />
<add key="TQTPagingDifference" value="500" />
<add key="TLTSearchRecords" value="500" />
<add key="ManagingLocation" value="Hong Kong,London,New York,Paris" />
<!--<add key="ManualTradeServlet" value="http://136.50.107.141:9080/dev/UploadAction.do" /> -->
<add key="ManualTradeServlet" value="http://136.50.107.141:9080/dev/UploadAction.do" />
<add key="CheckForUpdates" value="60"/>
<add key="appPath" value="http://localhost" />
<add key="TQTDownloadPagingDifference" value="5000" />
<add key="TQTDownloadLimit" value="60000" />
<add key="gvsadminpkg_getuserdata" value="GVS_ADMIN_PKG.GetUserData" />
<add key="gvsadminpkg_saveuserdata" value="GVS_ADMIN_PKG.SaveUserData" />
<add key="gvsadminpkg_adminops" value="GVS_ADMIN_PKG.AdminOperations" />
<add key="gvsfeedpkg_updatestmtstatus" value="GVS_PROCESS_FEED_PKG.PROC_UPD_STMT_FE" />
<add key="excludedproducts" value="FXS,SDS,SPM,SPT,SWO,ASW,BMO" />
</appSettings>
<location path="images">
<system.web>
<authorization>
<allow users="*"/>
</authorization>
</system.web>
</location>
<location path="styles">
<system.web>
<authorization>
<allow users="*"/>
</authorization>
</system.web>
</location>
<location path="Administration">
<system.web>
<authorization>
<allow users="*"/>
</authorization>
</system.web>
</location>
<location path="ajaxpro">
<system.web>
<authorization>
<allow users="*"/>
</authorization>
</system.web>
</location>
<system.web>
<pages buffer="true" enableSessionState="true" enableViewState="true" enableViewStateMac="false" />
<identity impersonate="true"/>
<httpHandlers>
<!--<add verb="POST,GET" path="ajax/*.ashx" type="Ajax.PageHandlerFactory, Ajax" />-->
<add verb="*" path="ajaxpro/*.ashx" type="AjaxPro.AjaxHandlerFactory, AjaxPro"/>
</httpHandlers>
<httpRuntime executionTimeout="60000" maxRequestLength="100000" useFullyQualifiedRedirectUrl="false" minFreeThreads="8" minLocalRequestFreeThreads="4" appRequestQueueLimit="100" enableVersionHeader="true"/>
<!-- DYNAMIC DEBUG COMPILATION
Set compilation debug="true" to enable ASPX debugging. Otherwise, setting this value to
false will improve runtime performance of this application.
Set compilation debug="true" to insert debugging symbols (.pdb information)
into the compiled page. Because this creates a larger file that executes
more slowly, you should set this value to true only when debugging and to
false at all other times. For more information, refer to the documentation about
debugging ASP.NET files.
-->
<compilation defaultLanguage="c#" debug="true"/>
<!-- CUSTOM ERROR MESSAGES
Set customErrors mode="On" or "RemoteOnly" to enable custom error messages, "Off" to disable.
Add <error> tags for each of the errors you want to handle.
"On" Always display custom (friendly) messages.
"Off" Always display detailed ASP.NET error information.
"RemoteOnly" Display custom (friendly) messages only to users not running
on the local Web server. This setting is recommended for security purposes, so
that you do not display application detail information to remote clients.
-->
<customErrors mode="RemoteOnly" defaultRedirect="ErrorPage.aspx">
<error statusCode="500" redirect="ErrorPage.aspx?err=500" />
<error statusCode="404" redirect="ErrorPage.aspx?err=404" />
<error statusCode="403" redirect="ErrorPage.aspx?err=403" />
</customErrors>
<!-- AUTHENTICATION
This section sets the authentication policies of the application. Possible modes are "Windows",
"Forms", "Passport" and "None"
"None" No authentication is performed.
"Windows" IIS performs authentication (Basic, Digest, or Integrated Windows) according to
its settings for the application. Anonymous access must be disabled in IIS.
"Forms" You provide a custom form (Web page) for users to enter their credentials, and then
you authenticate them in your application. A user credential token is stored in a cookie.
"Passport" Authentication is performed via a centralized authentication service provided
by Microsoft that offers a single logon and core profile services for member sites.
slidingExpiration=[true|false]
-->
<authentication mode="Forms">
<!--
<forms loginUrl="login.aspx" name="adAuthCookie" timeout="600" path="/" slidingExpiration="false" />
-->
</authentication>
<!-- AUTHORIZATION
This section sets the authorization policies of the application. You can allow or deny access
to application resources by user or role. Wildcards: "*" mean everyone, "?" means anonymous
(unauthenticated) users.
-->
<authorization>
<!--<allow users="*" />-->
<!-- Allow all users -->
<deny users="?"/>
<!-- Deny anonymous users -->
<!-- <allow users="[comma separated list of users]"
roles="[comma separated list of roles]"/>
<deny users="[comma separated list of users]"
roles="[comma separated list of roles]"/>
-->
</authorization>
<!--<identity impersonate="true" />-->
<!-- APPLICATION-LEVEL TRACE LOGGING
Application-level tracing enables trace log output for every page within an application.
Set trace enabled="true" to enable application trace logging. If pageOutput="true", the
trace information will be displayed at the bottom of each page. Otherwise, you can view the
application trace log by browsing the "trace.axd" page from your web application
root.
-->
<trace enabled="false" requestLimit="10" pageOutput="false" traceMode="SortByTime" localOnly="true"/>
<!-- SESSION STATE SETTINGS
By default ASP.NET uses cookies to identify which requests belong to a particular session.
If cookies are not available, a session can be tracked by adding a session identifier to the URL.
To disable cookies, set sessionState cookieless="true".
mode="Off|InProc|StateServer|SQLServer"
-->
<sessionState mode="InProc" timeout="36"/>
<!-- GLOBALIZATION
This section sets the globalization settings of the application.
-->
<globalization requestEncoding="utf-8" responseEncoding="utf-8"/>
</system.web>
</configuration>
|
|
|
|
|
You are being redirected to the Login page because the authentication cookie has either expired or has not been set. If the page is in another application with its own set of security requirements then it too needs to authenticate the user before serving the request.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Hi Mark ,
could you please elaborate me on the same thing you replied me - where exactly shall i look ?
the markup given
<form name="Form1" method="post" action="login.aspx?ReturnUrl=%2fValuations%2fToDoList.aspx" id="Form1">
is of the login-page which is finally displayed unexpectedly, and we have no-where set such form-action in application so as to redirect to login.aspx.
And I have used tabs-based UI control in my application where I click around and if kept any page in the tab idle for sometime(may it be 2-5-10-15 mins), and clicks on another tab link in the application, it suddenly redirects to Login.aspx page.I saw the view source of that login page and pasted above.
Thanks
- Ajay K
|
|
|
|
|
i would imagine your getting login because it is stated in the authentication/authorisation part of web.config. Deny users'?' will force all annonymous users out to the login.aspx page.
|
|
|
|
|
It is not unexpected to be sent to the login page after the authentication token has expired, you have been told this several times.
The form action is automatically created by ASP.NET.
Review this
ASP.NET Authentication[^]
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Thanks for your co-operation, Mark .
But could you please reply me any flaw in config file I pasted earlier, which is making it redirected to login.aspx automatically .
- Ajay
|
|
|
|
|
You are not understanding. THIS IS EXPECTED BEHAVIOR. You have been told that several times. THIS IS EXPECTED BEHAVIOR. The authentication token has expired. THIS IS EXPECTED BEHAVIOR. Read the information you have been given. THIS IS EXPECTED BEHAVIOR.
Is this clear to you now!!!
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Thanks for your reply, Mark.
But I am unable to get your explanation because of below statements -
deny = * means deny everyone
deny = ? means deny unauthenticated users
So we are using deny = ?, which is correct and has to be there(I think), so how could it be expected behaviour - thats what I am confused with..
Means is it expected every web-app logs out after 10 mins...?
- Ajay
|
|
|
|
|
READ THE DOCUMENTATION
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Thanks a lot, Mark for your co-operation and replies to me.
The issue was a severe one and was facing it for last fortnite.
And now it is resolved ...!!!!
Thanks Again very much...!
- Ajay K
|
|
|
|
|
If the markup you posted is on the page where you are clicking around (not the login page) then it seems like you are redirecting the user to the login.aspx page when the form is submitted. Unless the login page checks to see if the user is authenticated and then redirects to the appropriate page, this would explain why it is redirected to the login page.
Question:
1) What do you mean by 'tab'. Are you talking about an IE7 tab, a tab control or links that look like tabs?
2) Any reason you set the action attribute on the form? I think the last time I did that was during the classic asp time.
|
|
|
|
|
Hi
the markup given
<form name="Form1" method="post" action="login.aspx?ReturnUrl=%2fValuations%2fToDoList.aspx" id="Form1">
is of the login-page which is finally displayed unexpectedly, and we have no-where set such form-action in application so as to redirect to login.aspx.
And I have used tabs UI control in my application where I click around and if kept any page in the tab idle for sometime(may it be 2-5-10-15 mins), and clicks on another tab link in the application, it suddenly redirects to Login.aspx page.I saw the view source of that login page and pasted above.
Thanks
- Ajay K
|
|
|
|
|
Good Day All
i have a function that is getting called with Pagemethods like this
protected void Bind_SearchBox(object sender, EventArgs e)
{
RadToolBarItem textItem = RadToolBar1.FindItemByText("Button1");
TextBox txtseach = (TextBox)textItem.FindControl("txtsearch");
try
{
if (sender.Equals(txtseach))
{
Bind_SearchBox(txtseach.Text);
}
}
catch (SqlException ex)
{
lblMessage.Text = ex.Message;
Response.Redirect("View.aspx", false);
}
}
and this method will call this
public void Bind_SearchBox(String Search)
{
Session["Search"] = Search;
RadPanelBar1.Items.Clear();
RadScheduler1.Appointments.Clear();
RadToolBarItem textItem = RadToolBar1.FindItemByText("Button1");
RadMenu RadMenu1 = (RadMenu)textItem.FindControl("RadMenu1");
ViewerService.ViewerService obj = new ViewerService.ViewerService();
String SessionKey = obj.newSession();
DateTime Date1 = Convert.ToDateTime("1980-01-01");
DateTime Date2 = Convert.ToDateTime("2012-12-31");
List<string> ParentRecordsRow = new List<string>();
List<string> ChildRecordsField = new List<string>();
ViewerService.extract extract = obj.getObjects(SessionKey, Search, Date1, false, Date2, false, "", "");
try
{
int Len = extract.set.Length;
for (int i = 0; i < Len; i++)
{
ViewerService.vertex value = extract.set[i];
String PanelClass = value.meta;
PanelClass = PanelClass.Replace(Remstr, "");
PanelClass = PanelClass.Replace(Remstr2, "");
Appointment app = null;
if (value.atom != null)
{
RadPanelItem pane = RadPanelBar1.Items.FindItemByText(PanelClass);
if (pane == null)
{
RadPanelItem nwpane = new Telerik.Web.UI.RadPanelItem(PanelClass);
RadPanelItem nwpaneSpliter = new Telerik.Web.UI.RadPanelItem(PanelClass);
nwpaneSpliter.IsSeparator = true;
RadPanelBar1.Items.Add(nwpane);
pane = nwpane;
ParentRecordsRow.Add(PanelClass);
}
if (value.meta == "za.co.abacus.C_EVENT")
{
app = new Appointment();
}
int atomLen = value.atom.Length;
for (int j = 0; j < atomLen; j++)
{
ViewerService.atom atm = value.atom[j];
if (atm.meta.Contains("za.co.reactor.A_LABEL"))
{
RadPanelItem NewItem = new RadPanelItem(atm.content);
pane.Items.Add(NewItem);
ChildRecordsField.Add(atm.content);
if (app != null)
{
app.Subject = atm.content;
app.Description = atm.content;
app.ID = value.key;
}
}
if (app != null && atm.meta.Contains("za.co.abacus.C_EVENT"))
{
app.ID = atm.content;
}
if (app != null && atm.meta.Contains("za.co.reactor.A_HORIZON"))
{
app.Start = Convert.ToDateTime(atm.content);
}
if (app != null && atm.meta.Contains("za.co.reactor.AA_HORIZON"))
{
app.End = Convert.ToDateTime(atm.content);
}
if (app != null && atm.meta.Contains("za.co.reactor.A_TEXT"))
{
app.Description = atm.content;
}
if (app != null && app.End > app.Start)
{
RadScheduler1.DataStartField = app.Start.ToString();
RadScheduler1.DataSubjectField = app.Subject.ToString();
RadScheduler1.DataEndField = app.End.ToString();
RadScheduler1.DataKeyField = app.ID.ToString();
RadScheduler1.SelectedView = SchedulerViewType.MonthView;
AddManualAppointments(app.ID.ToString(), app.Start, app.End, app.Subject.ToString());
RadScheduler1.SelectedDate = app.Start;
RadScheduler1.Visible = true;
LeftPane.Collapsed = false;
RadGrid1.DataSource = EAVProcess.GetRecords(ParentRecordsRow, ChildRecordsField);
RadGrid1.DataBind();
}
}
}
}
RadMenu1.Flow = ItemFlow.Horizontal;
RadMenuItem item = new RadMenuItem();
item.Text = "";
item.ImageUrl = "~/images/Add.png";
RadMenu1.Items.Add(item);
for (int KK = 0; KK < ParentRecordsRow.Count; KK++)
{
RadMenuItem itemSeparator = new RadMenuItem();
RadMenuItem childItem = new RadMenuItem(ParentRecordsRow[KK]);
childItem.Text = ParentRecordsRow[KK];
item.Items.Add(childItem);
}
}
catch (ApplicationException ex)
{
lblTestlabel.Text = ex.Message;
}
finally
{
obj.closeSession(SessionKey);
obj = null;
extract = null;
}
}
and the page method for the client side
[WebMethod, System.Web.Script.Services.ScriptMethod]
public static string Getadata(String StrSearch)
{
View obj = new View();
obj.Bind_SearchBox(StrSearch);
return StrSearch;
}
and on the client side
function keyPress_test()
{
var tb = document.getElementById("<%=txtsearchid%>");
if (window.event.keyCode == 13)
{
PageMethods.Getadata(tb.value, myFunction(tb.Value));
ToggleCollapsePane();
}
return false;
}
function myFunction(msg) {
alert(msg);
}
So when i press enter it start searching and do all the data binding , now its fine but i went to debug it and i saw that this gets fired twice
What is wrong ?
Thanks
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
Just a thought, are you calling this method on Page_Load?
|
|
|
|
|
i am Calling the Function when the user presses enter , here is the markup
<asp:TextBox ID="txtsearch" runat="server" AutoPostBack="true" <br />
Font-Size="X-Large" Height="38px" CssClass="imgTextbox" onkeypress="this.keyPress_test()return false;"<br />
OnTextChanged="Bind_SearchBox" Width="650px" />
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
Remove the OnTextChanged attribute. That probably causes the second fire.
|
|
|
|
|
When I run the ASP.NET application showing Ajax runtime script failed to load. Please suggest me the remedy of this issue
Ahamed Azeem
software Programmer
|
|
|
|
|
|
Hi,
I have two dropdownlist controls within Listview control.I need to populate the second dropdownlist on SelectedIndexchange event of the first dropdownlist.
protected void Drp_Division_SelectedIndexChanged(object sender, System.EventArgs e)
{
DropDownList ddl = (DropDownList)sender;
DivisionID = Convert.ToInt32(ddl.SelectedValue);
}
within this event, how could i identify the second dropdownlist.
|
|
|
|
|
|
Hi i am using calender extender inside gridview in my website, which basically shows only mo,tu,we,thu instead of showing whole 7 days a week, can any one help me in this, in all other place expect grid vew the calender extender is working fine.
Many Thanks
|
|
|
|
|
Sounds to me the calendar extender is being clipped. Check for your gridview sizes.
Next time show us the relevant code so it is more clear
|
|
|
|
|
Hi all,
I have one question very very easy but what I don't know do.
With vb 6 when I want create a group checkbox only I have that copy and paste the same checkbox into panel and vb 6 create the group.
Well, with vb.net and asp.net (v.studio 2008) if I copy and paste the name ID is diferent and is not posible create a group with properties.
Also I have tried select 2 or 3 checkbox with key "control + click" but nothing is not posible.
Later I have tried to put into code the name of group and I don't see errors but I don't know how call later to group, I put you my simple code that I want to do:
<asp:Panel ID="Panel1" runat="server" Width="451px" >
<asp:CheckBox ID="ChkDia1" runat="server" CssClass="negro11b" Text="Lunes" group="ChkDia" />
<asp:CheckBox ID="ChkDia2" runat="server" CssClass="negro11b" Text="Martes" group="ChkDia" />
<asp:CheckBox ID="ChkDia3" runat="server" CssClass="negro11b" Text="Miercoles" group="ChkDia"/>
<asp:CheckBox ID="ChkDia4" runat="server" CssClass="negro11b" Text="Jueves" group="ChkDia"/>
<asp:CheckBox ID="ChkDia5" runat="server" CssClass="negro11b" Text="Viernes" group="ChkDia"/>
<asp:CheckBox ID="ChkDia6" runat="server" CssClass="negro11b" Text="Sabado" group="ChkDia"/>
<asp:CheckBox ID="ChkDia7" runat="server" CssClass="negro11b" Text="Domingo" group="ChkDia"/>
</asp:Panel>
'Ocultar todos chkDia
Dim i As Integer
For i = 1 To 7
ChkDia(i).Visible = False
Next
Thanks for your help!
|
|
|
|
|