I am creating a new ASP.NET MVC 4 application (actually my first MVC application) that is a part of my previous ASP.NET web forms application. I have never used ASP.NET inbuilt authentication methods in any of my project. This new MVC 4 app will be published on a sub-domain of previous app. Login will be done from previous app. A return url should be provided from MVC app to return back to current page if not logged in. However, New User Registration, Account Recovery options are already developed in previous web forms application and I don't want to replicate them …

Member Avatar
Member Avatar
+0 forum 1

I want to write a script that logs an user into Facebook and initialize oauth dialog to get the access_token(*I don't want to log in into a website using facebook account!*). I don't want to use facebook-sdk,pyfb etc. This is what I've tried: import sys, urllib2,json,urlparse,webbrowser, os, cookielib, re class Facebook(): def __init__(self, email, password): self.email = email self.password = password cj = cookielib.CookieJar() opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cj)) opener.addheaders = [('Referer', 'http://login.facebook.com/login.php'), ('Content-Type', 'application/x-www-form-urlencoded'), ('User-Agent', 'Mozilla/8.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.7) \ Gecko/20091221 Firefox/3.5.7 (.NET CLR 3.5.30729)')] self.opener = opener def login(self): url = 'https://login.facebook.com/login.php?login_attempt=1' data ="locale=en_US&non_com_login=&email="+self.email+"&pass="+self.password+"&lsd=20TOl" usock = …

Member Avatar
+0 forum 0

Hello, once again I have a very BIG problem. I made program that connect to proxy server and browse via proxy server. However, my company has a made private proxy server which I must authenticate through to get to the internet. I read hundreds pages of docs, but without success. My program code look like so: [CODE] module: Public Declare Sub UrlMkSetSessionOption Lib "urlmon.dll" _ (ByVal dwOption As Long, ByRef pBuffer As Any, _ ByVal dwBufferLength As Long, ByVal dwReserved As Long) Public Type INTERNET_PROXY_INFO dwAccessType As Long lpszProxy As String lpszProxyBypass As String End Type Public Const INTERNET_OPEN_TYPE_PROXY = …

Member Avatar
Member Avatar
+0 forum 1

Hello, new coder here :-) I've been working on one of my first scripts, an SMTP script for sending mail with Gmail. It works and all, but I wan't to have an "if" the login to the server failed, it would print and message saying so and return to the beginning. [CODE]gname = raw_input("Username: ") gpass = getpass.getpass("Password: ") server = smtplib.SMTP('smtp.gmail.com:587') server.ehlo() server.starttls() server.ehlo() server.login(gname,gpass)[/CODE] The first part is where the user inputs the login data, and then it continues the to try and log onto the Gmail account. If at first I spell my username incorrectly, or type …

Member Avatar
Member Avatar
+0 forum 10

I know I am probably missing something small but I can't seem to get it running I need to send an html email for newsletters and on registration But it needs to be authorised so it doesn't get marked as spam or filtered. here is what I have so far: [CODE] function authSendEmail($from, $namefrom, $to, $nameto, $subject, $message) { //SMTP + SERVER DETAILS /* * * * CONFIGURATION START * * * */ $smtpServer = ""; $port = "25"; $timeout = "30"; $username = ""; $password = ""; $localhost = "localhost"; $newLine = "\r\n"; /* * * * CONFIGURATION END …

Member Avatar
+0 forum 0

Question withdrawn. Answer: Developer Error

Member Avatar
+0 forum 0

Hi all, Currently working on Visual Studio trying to create a login system for my website. Tried following various tutorials but can't seem to get them to work. Are the pre-defined login tools on Visual Studio good enough? I've got part way there using them but can't piece it all together. I have an sql database with a users table (containing username/password fields) and get the login tools to login but am unsure how to check which member is logged in/where the info is stored etc. Session variables? Thanks.

Member Avatar
Member Avatar
+0 forum 1

The End.