|
i made a custom error in web.config as the following code
<customErrors mode="On" >
<error statuscode="404" redirect="fnf.aspx" />
</customErrors>
but when i write a nonexistent page in the url i expected what i wrote in the fnf.aapx page but that what i had
Line 29: -->
Line 30: <customErrors mode="On" >
Line 31: <error statuscode="404" redirect="fnf.aspx" >
Line 32: </error>
Line 33: </customErrors>
what is the problem
thanks in advance
haitham
|
|
|
|
|
The problem is propably the casing of the word statuscode, it should be statusCode
<blockquote class="FQ"><div class="FQA">haytham_mohammad wrote:</div>Line 29: -->
Line 30: <customErrors mode="On" >
Line 31: <error statuscode="404" redirect="fnf.aspx" >
Line 32: </error>
Line 33: </customErrors></blockquote>
Kind Regards,
John Petersen
|
|
|
|
|
Hi ,
I am supposed to develop a web application in .Net 2.0, which should convert a file of any print support type to TIFF, JPEG, PDF and Text format on demand.
Please suggest me how can accomplish this task.
Thanks and Regards,
Raj.
|
|
|
|
|
I have been using Cassini (lightweight web server) and everytime something goes wrong I suspect that Cassini is the cluprit.... when actually Cassini is probably not the problem.
So I am wondering about Cassini limitations - specifically should membership & role functionality work just fine? Should I use IIS instead when learning about membership & roles --- will it work with fewer issues for membership & roles.
I merely using Cassini right now to teach myself ASP.NET 2.0. I do like the fact that I do not need to go through the work of creating virtual directory etc, just to do a quick demo project.
More generally this is what I have found to be the mentioned limitations or issues with Cassini use. This is only from a book and I do not claim full understanding of these limitations 1) does not scale to more than on user 2) because of simplifications to the user model, Cassini cannot support a robust security scheme [ is this referring to ssl security?] 3) when you run a page in Cassini it locks the page back in the IDE, so you must close the browser before working on the page back in the IDE. 4) Cassini needs a robust firewall [ so does this imply using IIS you automatically get better security somehow?]
Does anyone have advice on what to add to the list of Cassini limitations?
I did do a quick google search on "Cassini" and "Cassini limitations" I did find this site http://forums.asp.net/67/ShowForum.aspx[^]
There certainly a lot of issues with getting things to work with Cassini on the latter site. I did take an ASP.NET class and we only used Cassini.
|
|
|
|
|
How can I aceess system drives in asp.net(with C#) appliation? How to set permissions to folders in a drive from asp.net?
Thanks,
Bhasker P
|
|
|
|
|
hi bhasker,
use directoryinfo class which is present in the system.io namespace.
To set the permission to folders, the following steps are to be followed:-
Right click the folder to which you want to set permission.
Select properties.
Now, click on the Security tab.
Click on the Add button or select your user name from the given list.
Set the permission for the folder.
Click on the Apply button then press ok button to set the permission.
Thanks & regards,
Suresh Dayma
Everything Is Possible!
|
|
|
|
|
I am still having trouble with Form Authentication. Looks like my vb code doens't like the FormsAuthentication.RedirectfromLoginpage. I think its a variable that is not declared.
Here is my web.config
<forms name="AuthCookie" loginurl="Login.aspx" defaulturl="Default.aspx"
timeout="60" protection="All" cookieless="AutoDetect">
<trace enabled="false" requestlimit="10" pageoutput="false" tracemode="SortByTime" localonly="true">mode="InProc"
stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes"
cookieless="false"
timeout="20"
/>
This is what my login button looks like:
Private Sub btnSubmit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSubmit.Click
Dim objSqlDataset As New DataSet
Dim isfound As Boolean = False
Dim objSqlDataAdapter As New SqlDataAdapter
Dim i As Integer = 0
Dim SelectMembers = New SqlCommand("select * from Members", objSqlConnection)
objSqlDataAdapter.SelectCommand = SelectMembers
objSqlDataAdapter.Fill(objSqlDataSet, "Members")
pstrUserId = Me.txtUserId.Text.Trim
PstrPassword = Me.txtPassword.Text.Trim
With objSqlDataSet.Tables("Members").TableName
Do Until (i >= objSqlDataSet.Tables("Members").Rows.Count Or isfound)
If objSqlDataSet.Tables("Members").Rows(i).Item("UserId").TOUPPER = pstrUserId.ToUpper Then
'Update the Flag
isfound = True
Else
'increment the counter
i = i + 1
End If
Loop
If isfound Then
If objSqlDataSet.Tables("Members").Rows(i).Item("Password").TOUPPER = PstrPassword.ToUpper Then
If Me.chkPassword.Checked = True Then
Response.Cookies("FremontPokerLeague")("FirstName") = objSqlDataset.Tables("Members").Rows(i).Item("FirstName").trim
Response.Cookies("FremontPokerLeague")("userId") = Me.txtUserId.Text.Trim
Response.Cookies("FremontPokerLeague")("Password") = Me.txtPassword.Text.Trim
Response.Cookies("FremontPokerLeague").Expires = DateTime.Now.AddMonths(1)
formsauthentication.redirectfromloginpage(pstrUserId, False)
End If
objSqlDataset.Dispose()
objSqlDataset = Nothing
objSqlDataAdapter.Dispose()
objSqlDataAdapter = Nothing
insertLogin()
Else
Lblstatus.Text = "Invalid Password!"
End If
Else
Lblstatus.Text = "Invalid User Id!"
End If
End With
End Sub
So confused!
|
|
|
|
|
|
Mark
Thanks for replying. Basically I am looping through my Dataset to find the username and password. I am in the process of changing it to a simple select Command. My issue is why does it think my FormsAuthentication is a variable and not part of the web.config? I Know its working because I can't get to any page on my site unless I got to the login. But I can't set the AuthCookie...
|
|
|
|
|
|
I think my problem is that I don't have this <%@ Import Namespace="System.Web.Security" %> in my codebehind page.
|
|
|
|
|
Help!
I've got a page that I need to have show a report I've built with the included Crystal Reports tool. I've created the report, added the report viewer to the page, added the report document component, set up the data binding and no go....I get the following error:
Specified argument was out of the range of valid values. Parameter name: value
<CR:CrystalReportViewer id=crvPMReport accessKey="<%# cachedPM1 %>" runat="server" Height="50px" Width="350px">
Any thoughts? The report itself is simply one column of a table, thought I'd make sure it worked before I invested a ton of time in it....
|
|
|
|
|
Hi,
I have an imagebutton and a submit button in my usercontrol. I have few textboxes to enter search criteria. Imagebutton placed before the submit button on the design code. When the user press "enter" key imagebutton's click event is firing, but I want the submit button't click event to get fired. Both are running at server. Both actions pulling data from the database.
Ram
|
|
|
|
|
Here by default imagebutton(whichever will come first) will get fired if you want other button to get fired then you have to use javascript for that.
Best Regards,
Apurva Kaushal
|
|
|
|
|
I tried all possibities of scripting, could you send something.
|
|
|
|
|
Two possibilities are there, first you place the control(whose event you want to get fired on enter key) before the other. The second possibility is to use javascript code that will trap the enter key and fire the event. The javascript function to trap the enter key is this:
function TrapEnterKey(field,event)<br />
{<br />
var keyCode = event.keyCode?event.keyCode:event.which?event.which:event.charcode<br />
if(keyCode==13)<br />
{<br />
document.getElementById("BtnSearch").click();<br />
return false;<br />
}<br />
}
Best Regards,
Apurva Kaushal
|
|
|
|
|
|
Hi,
I have created an application running on ASP.Net using C#. I have a panel and a button to print the page.On click of button content of the panel should be printed and not other part of page. Can anyone help me on this, please?
Thank u.
kamalnath
|
|
|
|
|
exactly waht i want to do i want to check that whether a particular string is in the string or not?
like
str ="C:\Inetpub\wwwroot\medicaps";
now i want ot check whether a wwwroot is in this string or not.
thanx
|
|
|
|
|
Perhaps you would like to listen to the advice given on your last post before asking the same question again.
only two letters away from being an asset
|
|
|
|
|
I know C++ had a string compare function, If if available in .Net dont know
|
|
|
|
|
Hi here is the way, we can use "IndexOf" string class method.
string strTest = "I am strong";
if(strTest.IndexOf("strong")==0) { return(false); }
Ram
|
|
|
|
|
Using IndexOf will work but the System.Text.RegularExpressions is a better way, here is an example.
<br />
Private Function InLine(ByVal Line As String, ByVal Value As String) As Boolean<br />
Dim r As Regex = New Regex(Value, RegexOptions.IgnoreCase)<br />
Dim m As Match = r.Match(Line)<br />
If m.Success Then Return True Else Return False<br />
End Function<br />
|
|
|
|
|
Why not just use .Contains()?
|
|
|
|
|
To the best of my knowledge .Contains is not available to string variables. It is for ArrayList and other Collection objects. If this is wrong could you please show me an example?
|
|
|
|