Click here to Skip to main content
15,390,952 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Can shell32.dll be used in IIS environment? Pin
Richard Deeming20-Oct-21 22:17
mveRichard Deeming20-Oct-21 22:17 
GeneralRe: Can shell32.dll be used in IIS environment? Pin
Member 35932620-Oct-21 23:54
MemberMember 35932620-Oct-21 23:54 
GeneralRe: Can shell32.dll be used in IIS environment? Pin
Richard Deeming21-Oct-21 1:09
mveRichard Deeming21-Oct-21 1:09 
GeneralRe: Can shell32.dll be used in IIS environment? Pin
Member 35932621-Oct-21 22:46
MemberMember 35932621-Oct-21 22:46 
Questionweb config asp.net project of sql server Pin
Member 1101590512-Sep-21 19:20
MemberMember 1101590512-Sep-21 19:20 
AnswerRe: web config asp.net project of sql server Pin
Richard MacCutchan12-Sep-21 22:08
mveRichard MacCutchan12-Sep-21 22:08 
AnswerRe: web config asp.net project of sql server Pin
Dave Kreskowiak13-Sep-21 1:18
mveDave Kreskowiak13-Sep-21 1:18 
QuestionGet a Field value for recovery a password Pin
Luis M. Rojas3-Sep-21 5:17
MemberLuis M. Rojas3-Sep-21 5:17 
We have a login
If you type the username and password and press submit, we called the login.cs
everything is validate and OK,
but we have a password recovery link, where you have to type the username in order
to send you the email, in both case we called the same page: login, but we a parameter: <a href="login?expire=1" class="btn btn-ic btn-link pkg-photo">Olvide mi clave</a>
this is the function called:
if (Get<bool>("expire"))
	{
   	   if (!Empty(Username))
	   {
		ExecuteRow("sp_sopv2_EnviarCorreoClave " + Username);
   	        SuccessMessage = "Se a enviado un correo a su cuenta de email que tiene registrado con nosotros favor verificar.Una vez acceda a su cuenta debe cambiar su clave por seguridad";
  	 }
	else{
		WarningMessage = "Favor de escribir el Usuario!";
	   }
}

the problem: the username field it passed with no value, only has value if you press submit

Here de login.cshtml:

 <div class="box box-primary login-box ewLoginBox">
    <div class="login-box-body">
	<p class="login-box-msg">@Html.Raw(Language.Phrase("Login"))</p>
	<div class="form-group">
	<div><input type="text" name="username" id="username" class="form-control ewControl" value="@_login.Username" placeholder="@Language.Phrase("Username")" autocomplete="username"></div>
    </div>
    <div class="form-group">
	<div><input type="password" name="password" id="password" class="form-control ewControl" placeholder="@Language.Phrase("Password")" autocomplete="current-password"></div>
    </div>
   <div class="checkbox">
	<label for="rememberme"><input type="checkbox" name="type" id="rememberme" value="a" @Html.Raw((_login.LoginType == "a") ? " checked" : "")>@Html.Raw(Language.Phrase("RememberMe"))</label>
   </div>
	<button class="btn btn-primary btn-block ewButton" name="btnsubmit" id="btnsubmit" type="submit">@Html.Raw(Language.Phrase("Login"))</button>
	@if (Config.Authentications.Count(kvp => kvp.Value.Enabled) > 0){
    	  <div class="social-auth-links text-center">
  	     <p>@Html.Raw(Language.Phrase("LoginOr"))</p>
	     @foreach (var kvp in Config.Authentications.Where(kvp => kvp.Value.Enabled)){
  	       <a href="ExternalLogin?provider=@kvp.Key" class="btn btn-block btn-social btn-flat btn-@kvp.Key.ToLower()">class="fa fa-@kvp.Key.ToLower()">@Html.Raw(Language.Phrase("Login" + kvp.Key))</a>
	     }
	  </div>
	}
<a href="login?expire=1" class="btn btn-ic btn-link pkg-photo">Olvide mi clave</a>


Here the login.cs 
Username = ""; // Initialize  
string password = "";
if (IsLoggingIn()) { // After changing password
   Username = Session.GetString(Config.SessionUserProfileUserName);
   password = Session.GetString(Config.SessionUserProfilePassword);
   LoginType = Session.GetString(Config.SessionUserProfileLoginType);
   validPassword = Security.ValidateUser(ref Username, ref password, false);
   if (validPassword) {
	Session[Config.SessionUserProfileUserName] = "";
	Session[Config.SessionUserProfilePassword] = "";
   }
   } else { // Normal login
	if (!Security.IsLoggedIn)
	Security.AutoLogin();
	Security.LoadUserLevel(); // Load user level
	bool encrypted = false;					
	if (!Empty(Post("username"))) {
  	// Login by form post
	Username = RemoveXss(Post("username"));
	password = RemoveXss(Post("password"));
	LoginType = RemoveXss(Post("type"));
        .
        .
	.
	
	if (Get<bool>("expire"))
	{
   	   if (!Empty(Username))
	   {
		ExecuteRow("sp_sopv2_EnviarCorreoClave " + Username);
   	        SuccessMessage = "Se a enviado un correo a su cuenta de email que tiene registrado con nosotros favor verificar.Una vez acceda a su cuenta debe cambiar su clave por seguridad";
  	 }
	else{
		WarningMessage = "Favor de escribir el Usuario!";
	   }
	}



Any help.

AnswerRe: Get a Field value for recovery a password Pin
Richard Deeming3-Sep-21 5:34
mveRichard Deeming3-Sep-21 5:34 
GeneralRe: Get a Field value for recovery a password Pin
Luis M. Rojas3-Sep-21 5:55
MemberLuis M. Rojas3-Sep-21 5:55 
GeneralRe: Get a Field value for recovery a password Pin
Richard Deeming3-Sep-21 6:10
mveRichard Deeming3-Sep-21 6:10 
QuestionWebService just will not work :-( Pin
Oliver Freeman1-Sep-21 5:48
MemberOliver Freeman1-Sep-21 5:48 
AnswerRe: WebService just will not work :-( Pin
Richard Deeming1-Sep-21 21:59
mveRichard Deeming1-Sep-21 21:59 
GeneralRe: WebService just will not work :-( Pin
Oliver Freeman2-Sep-21 1:59
MemberOliver Freeman2-Sep-21 1:59 
GeneralRe: WebService just will not work :-( Pin
DerekT-P21-Oct-21 7:37
professionalDerekT-P21-Oct-21 7:37 
QuestionIs it possible to add fore ground and back ground to any app that is down? Pin
samflex31-Aug-21 18:39
Membersamflex31-Aug-21 18:39 
AnswerRe: Is it possible to add fore ground and back ground to any app that is down? Pin
Richard Deeming31-Aug-21 22:01
mveRichard Deeming31-Aug-21 22:01 
GeneralRe: Is it possible to add fore ground and back ground to any app that is down? Pin
samflex1-Sep-21 5:50
Membersamflex1-Sep-21 5:50 
GeneralRe: Is it possible to add fore ground and back ground to any app that is down? Pin
Richard Deeming1-Sep-21 21:47
mveRichard Deeming1-Sep-21 21:47 
GeneralRe: Is it possible to add fore ground and back ground to any app that is down? Pin
samflex2-Sep-21 3:02
Membersamflex2-Sep-21 3:02 
Questionproject code in .net for online banking transaction Pin
Jk 0724-Aug-21 5:12
MemberJk 0724-Aug-21 5:12 
AnswerRe: project code in .net for online banking transaction Pin
Richard MacCutchan24-Aug-21 5:40
mveRichard MacCutchan24-Aug-21 5:40 
GeneralRe: project code in .net for online banking transaction Pin
Member 1534301831-Aug-21 22:04
MemberMember 1534301831-Aug-21 22:04 
QuestionI am having problem creating a script to monitor Rest/API services. Pin
samflex23-Aug-21 8:11
Membersamflex23-Aug-21 8:11 
AnswerRe: I am having problem creating a script to monitor Rest/API services. Pin
Richard Deeming23-Aug-21 21:15
mveRichard Deeming23-Aug-21 21:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.