Integrate gmail in asp.net web application - asp.net

I am using asp.net 3.5 with C#.
I want to integrate gmail into my site, just like any widget so that, people can login there and can access their gmail account. Actually gmail is blocked in my organisation & I want to access it via proxy that I can integrate in my website.
Thanks a billion.

Johnvey Hwang's Gmail API is probably a good place to start.

If you can't access gmail in your organisation, embedding it in another page is unlikely to avoid this.
Depending on how it is blocked, you may not be able to code any solution to access it.
If you can access your account via POP or IMAP then better than coding anything you could simply to use an alternative mail client (like thunderbird). This might work out of the box, or you could specify the server by IP address (209.85.227.19 should work). That should defeat many naïve web filtering implementations. If you can't access anything outside of port 80 then you could set up your own webmail solution such as SquirrelMail on your own server and use that to access your Gmail IMAP.
Of course the best solution would be to access your personal mail using your own internet connection rather than your work one. Gmail has excellent mobile phone clients, compatable with even the most basic phones, and the built-in mail client on most phones should work well with Gmail.

Related

Authorizing client browser

I am writing an app that will be used for a kiosk. The app will be asp.net, I will only want the app accessible from certain computers, using chrome.
I don't think limiting by up address would work since a few of the computers will be taken to conventions and used there.
I was thinking something with a custom certificate but would like advice.
I think the better way is to give login or/and password/special key to allow them to login through an identification page. After that, you put cookie into their chrome.
Finally, like all websites.

Smart Card Authentication with ASP.NET

What are the steps required to get smart-cards authentication working in ASP.net?
Smart-card reader is installed and works properly on the client's machine
user navigates to Login.aspx page and is prompted to swipe his access card
how do i authenticate the user
thanks.
The only way that I know to access a hardware device on a client machine through ASP.Net is by writing an ActiveX control. Doing this will render the site useless to anyone not running Internet Explorer. Based on my experience, you can say that IE is your standard, but there will be people attempting to use other browsers. And that's fine as long as you have the support of your App Admin team to say, "Sorry, use IE or don't use it at all".
Assuming you already know how to access the Smart Card reader's API, and you can successfully read and decode that data, your next step is Authenticating that data.
Again, you haven't given me any information here, so I'll assume that you have a database, against which you will need to validate the data you got from the smart card.
If the above returns true then it's simply a case of calling FormsAuthentication.RedirectFromLoginPage, or if you want a more granular control of the Authentication Cookie, then you can create your own FormsAuthenticationTicket
If this is a plug and play device and your clients are part of an AD domain then by simply enabling windows authentication allows you to enable smart card authentication without needing to resort to custom ActiveX controls and browser plugins.
A couple of pointers in that direction:
IIS supports client certificates
IIS Forum thread: Configuring IIS 7.5 to read certificates from a smart card

How to setup users with email: user#usersdomain.com in ASP.NET

I have a requirement which is to allow users to buy a domain through my site and then programatically set them up with email accounts at that domain, eg user1#domain.com user2#domain.com, etc.
To integrate the buying of the domain I'm planning on using a domain reseller like this.
The next step - of creating the email accounts - is where I'm floundering currently. I'm assuming I can programatically set the domain name to point where ever I need for the email pointers, but not sure how to programatically setup the email client on the other end. I don't care so much what the email client is - gmail, etc. Ideally I'd be able to brand it a bit, but it's not absolutely required.
Hoping someone has experience with this. Thanks in advance.
first you need to choose a mail server for your system. Then you get the SDK of this server and create with the provided interfaces users from your user interface.
For example, a basic free mail server is MailEnable that plesk also use for the same reason.
on this page you can get the sdk of the MailEnable mail server
http://www.mailenable.com/developers.asp
and there you can find the api to control it from your asp.net pages.
Hope this helps you to start.

How to get client MAC address by a access on a website?

I have my website, and it records the number of visitors, IP and time of access...
I want to identify each visitor... I think that this was possible recording IP Address... but when the IP is dynamic, my system fails. So I think that I can solve it recording MAC address... is possible? What language should use? PHP, ASP, Javascript?
Thanks
Edit: What I can use to identify each user without having login information (username & pwd).
The MAC address, by TCP/IP standards, is never communicated outside of the local-area network to which it pertains — routers beyond that LAN don't even get the information you're trying to record.
There are many other ways to try and identify unique visitors, including matching the user-agent's details in addition to the IP, serving cookies as part of your response, etc… it is, after all, a core functionality in the field of "web analytics".
MAC addresses are simply not part of the gamut of techniques that it makes sense to utilize for it!
It is only possible if you use a technique where you install a "native" app on the client machine. For example, an activeX component, java applet or a client application. Then that application, once installed can get the MAC and then call to your web server with the MAC as an argument. In other words, you have to build your own front end "browser" to handle logging in. Then once the user is logged in, you can launch the app in the default browser.
It would be nice if future browsers allowed users to give permission to specific sites to access the MAC. Then if a site had a button that said "Register this device" the web application could do so without needing an additional native app installed (after all, the browser IS a native app).
Can't you just have them store a cookie, so that when they come back they can be uniquely identified? No username/password requirement.
http://en.wikipedia.org/wiki/HTTP_cookie
Sorry but sending MAC address isn't part of the HTTP. However, you can use cookie to identify different users. Any backend language will do (add cookie in the server side). You can set the cookie in the client side using JavaScript too.

Bypassing exchange accounts while sending mail through SMTP Server in ASP.NET

I develop applications using the ASP.NET framework for my academic organization. We also have an exchange server for internal accounts.
Since my organization is under the umbrella of a larger one, all our internal exchange accounts also have external parent accounts with the same names.
I'm facing an issue where automatic emails triggered using the system.net.mail classes are correctly routed to the required email addresses, but they go into exchange account's inbox.
While this is not a big problem for some users, there are a few who want the emails to go to the parent accounts so that they can view emails while working from home.
I was wondering if there is any way I can achieve this at the application layer - to instruct the SMTP server to send mails to the external accounts with the same names and ignore the local active directory accounts.
Thanks.
No, you can't. The SMTP protocol doesn't have any spec for this.
I believe you would have to setup and point to an alternate relay for this to happen.

Resources