|
Hi,
I'm creating several web application projects but i want them all the share a common membership. currently each application has a seperate web.config file with the same membership details. I have 1 logon.aspx page which i want all applications to redirect too.
However at the moment the main logon application works fine, and the other applications redirect to it for logon but it just gets stuck on the logon page. What i think is happening is application B redirects to the logon page in appalication A the user logs on then it trys to redirect them back to the application B but looses the logon details which causes the application B to redirect them back to the logon in application A again. Hope that makes sence.
I think the problem lies in my web config file but i'm new to all this and would appeciate any help you can give.
I have this web config in both applications
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<connectionStrings>
<add name="MySqlConnection" connectionString="..." />
</connectionStrings>
<system.web>
<compilation debug="true" />
<authorization>
<deny users="*" />
</authorization>
<authentication mode="Forms">
<forms loginUrl="/AppA/logon.aspx" enableCrossAppRedirects="true" name=".ASPXFORMSAUTH" path="AppA" />
</authentication>
<membership defaultProvider="SqlProvider" userIsOnlineTimeWindow="15" >
<providers>
<clear />
<add minRequiredNonalphanumericCharacters="0"
name="SqlProvider"
type="System.Web.Security.SqlMembershipProvider"
connectionStringName="MySqlConnection"
applicationName="AppA"
enablePasswordRetrieval="false"
enablePasswordReset="true"
requiresQuestionAndAnswer="true"
requiresUniqueEmail="true"
passwordFormat="Hashed" />
</providers>
</membership>
<profile defaultProvider="SqlProvider" enabled="true">
<providers>
<clear/>
<add name="SqlProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="MySqlConnection" applicationName="AppA"/>
</providers>
<properties>
<add name="Title"/>
<add name="Forename" />
<add name="Surname" />
<add name="Department" />
</properties>
</profile>
<roleManager enabled="true" defaultProvider="SqlRoleProvider">
<providers>
<clear/>
<add name="SqlRoleProvider" type="System.Web.Security.SqlRoleProvider" connectionStringName="MySqlConnection"/>
</providers>
</roleManager>
</system.web>
</configuration>
no one ever said they wished they would have worked more on their death bed.
|
|
|
|
|
What do we mean by
Eliminating CSS Image Flicker with IE6
can anybody please expline me this
Regards,
Harshad G. Pednekar
|
|
|
|
|
It refers to the flicker that can occur on rollover images (typically found on navigation bars) as the image is swapped when the mouse rolls on/off.
|
|
|
|
|
Hi friends
I have .cs and .vb class files.I want to use both file in the same application.
Is it possible?
Thanks in advance
Pathan
---------------------------------------------------
|
|
|
|
|
They have to be in sepparte projects. Each project must be either C# or VB.net, not both.
Ben
|
|
|
|
|
Why would you have a mix of languages in the same application?
You can't mix them in the same application, however you can, of course, use the classes from different assemblies, written in different languages.
only two letters away from being an asset
|
|
|
|
|
Mark Nischalke wrote: You can't mix them in the same application, however you can, of course, use the classes from different assemblies, written in different languages.
You might want to rethink that sentence as you manage to contrdict yourself within it.
An application can be made up of many assemblies.
-- Always write code as if the maintenance programmer were an axe murderer who knows where you live.
Upcoming FREE developer events:
* Glasgow: Agile in the Enterprise Vs. ISVs, Mock Objects, SQL Server CLR Integration, Reporting Services, db4o ...
* Reading: SQL Bits
My website
|
|
|
|
|
Guess it didn't come out well. But I don't see the contradiction.
You can't mix languages within the same project, but can use classes from other assemblies, that where written in other .NET langauges.
only two letters away from being an asset
|
|
|
|
|
I need to implement Internal Search Engine in c# application.
I searched in google for source code and i got that in VB.
I can convert that into C# but I didnt have Enough time for that so just
I wanted to implement that module in c# project and I have done it successfully.
I take .vb classes files in different folder in App_Code and set belove code in webconfig and its running successfully.
<codeSubDirectories>
<add directoryName="VB"/>
</codeSubDirectories>
Thanks
Pathan
---------------------------------------------------
|
|
|
|
|
Hi,
Can U Send Me Sample Project.
Wherer u User C#, & VB Both.
My ID is
viren.it@gmail.com
Never Think That You Have Failed Instead Always Think That u hav Better Chance Next Time...
|
|
|
|
|
Hello Everyone,
Can anybody let me know how to send the NewsLetter from Mail in ASP.NET
Thnx & Regards
|
|
|
|
|
You should construct a mail message using the class MailMessage . Then you send it with SmtpClient .
Talal
-- If this is a post that has been helpful to you, please vote for it. Thank you!
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning."
--Rich Cook
|
|
|
|
|
Hi all,
Our intranet is made in ASP. Now I want to add some new features in intranet. Can I add webparts made in ASP.NET 2005 into out ASP website? If yes how Can I do that?
Thanks in advance,
Priyank
|
|
|
|
|
No, ASP and ASP.NET are different technologies. You can mix ASP style coding in an ASP.NET application, but can't do the reverse.
only two letters away from being an asset
|
|
|
|
|
No, you can't. though the technology is same, the .NET framework architecture is complete different from the classic ASP version. But You can integrate a webpart that is developed in ASP into ASP.NET application.
Regards John
|
|
|
|
|
Hello to all,
Is there anyone out there can shed a light why the information is getting shared between two or more users when they are signed on simultaneously? The problem is this, I created a web application where a user can sign on. I used session variables not cookies. When another user signs on to this web application and somehow any of the user save information they typed, it appears that the information getting saved is crossed over to the other user. It looks like they are sharing the same session.
I am sorry that is the clearest way I could explain it.
Thanks!
|
|
|
|
|
That doesn't make sense with session, but it would with Application variables. I am guessing you have a state problem with your app. A user is saving some stuff and then whoever does the next save also gets that stuff.
Ben
|
|
|
|
|
CodyGen wrote: When another user signs on to this web application and somehow any of the user save information they typed, it appears that the information getting saved is crossed over to the other user.
How they are saving information ? is it in sessions ? Show your code
|
|
|
|
|
Thanks for all of your reply. This doesn't happen all the time. So I am also thinking about concurrency problem. Here is the code. I used MyGeneration Doodads.
<br />
<br />
private static string nameid ="";<br />
<br />
private string GenerateNewID(string _NameID)<br />
{<br />
<br />
Names name = new Name();<br />
name.Where.NameID.Value = _NameID;<br />
name.Where.NameID.Operator = WhereParameter.Operand.Equal;<br />
name.Query.AddResultColumn(Name.ColumnNames.NameID);<br />
if (name.Query.Load())<br />
{<br />
Int32[] intsuffix = new Int32[name.RowCount];<br />
for (int x = 0; x < vwhhm.RowCount; x++)<br />
{<br />
intsuffix[x] = Convert.ToInt32(Right(vwhhm.NameID.Trim(), 2));<br />
name.MoveNext();<br />
}<br />
Array.Sort(intsuffix);<br />
string strsuffix = (intsuffix[name.RowCount - 1] + 1).ToString();<br />
if(strsuffix.Trim().Length<2)<br />
{<br />
strsuffix = "0" +strsuffix; <br />
}<br />
<br />
return _NameID + strsuffix;<br />
}<br />
else<br />
{<br />
return _NameID + "01";<br />
}<br />
<br />
}<br />
<br />
private sub ProcNames()<br />
{<br />
nameid = Session["NAMEID"].ToString();<br />
if(UpdateNames(nameid, GenerateNewID(Session["NAMEID"].ToString()), txtFname.Text, txtLname.Text)) <br />
{<br />
Response.Write("Saved Successfully."); <br />
}<br />
<br />
}<br />
<br />
private Boolean UpdateNames(string _NameID, string NewID, string FirstName, string LastName)<br />
{<br />
TransactionMgr tx = TransactionMgr.ThreadTransactionMgr();<br />
<br />
try<br />
{<br />
NameLists namelist = new NameLists();<br />
nameList.AddNew();<br />
namelist.NameID = _NameID.ToUpper();<br />
namelist.NewID = NewID.ToUpper();<br />
namelist.FName = FirstName.ToUpper();<br />
namelist.LName = LastName.ToUpper();<br />
<br />
tx.BeginTransaction();<br />
namelist.Save();<br />
tx.CommitTransaction();<br />
return true;<br />
<br />
}<br />
catch(Exception ex)<br />
{<br />
tx.RollbackTransaction();<br />
TransactionMgr.ThreadTransactionMgrReset();<br />
return false;<br />
<br />
}<br />
<br />
}<br />
The flow is generate a new name by putting a number suffix at the end of the original name. If there existing name, it would increment the number. So "name" will be "name01","name02" etc... I also use "private static string <variablename>". Is that the best way to declare a variable or just have it as private but not static? I used private static since I need to keep the value after postback.
If the problem happens, the name you saved will be added under my NameID.
Thanks again.
|
|
|
|
|
Server Error in '/' Application.
--------------------------------------------------------------------------------
The MaximumValue 1000000 cannot be less than the MinimumValue 500 of RangeValidator2.
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.Web.HttpException: The MaximumValue 1000000 cannot be less than the MinimumValue 500 of RangeValidator2.
My basic math skills tell me 1000000 is not less than 500.
"Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit..."
"There is no one who loves pain itself, who seeks after it and wants to have it, simply because it is pain..."
|
|
|
|
|
Richard Jones wrote: The MaximumValue 1000000 cannot be less than the MinimumValue 500 of RangeValidator2.
the Type property of the range validator is string.
The type should be Integer.
Regards John
|
|
|
|
|
Thanks
"Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit..."
"There is no one who loves pain itself, who seeks after it and wants to have it, simply because it is pain..."
|
|
|
|
|
Hi guys, i have a complex scenario for that i want your help, i am trying to create family tree it is similar to horizontal binary tree from 2 days but haven't got any success, if you have any idea or any resource then please help me out of this problem. Thanks in advance.
Aamir Dharani
|
|
|
|
|
How can i generate a hash Password and checks from database in Windows Application.
Like in Web Application we do
sHashPwd = FormsAuthentication.HashPasswordForStoringInConfigFile(txtPwd.Text & ds.Tables(0).Rows(0)("pwdSalt"), "MD5")
If sHashPwd.Trim.CompareTo(ds.Tables(0).Rows(0)("password").Trim()) <> 0 Then
lblMessage.Text = "Login failed please enter a valid password."
How can we do above procedure in Windows Application
Kartik
|
|
|
|
|