how to use facebook connect in local host - asp.net

Each developer is running IIS on his own machine. We all sit in separate physical location.
One developer develops the code using: http://localhost:8054/connectToFacebook.aspx
another developer develops the code using: http://localhost:80/virtualDirectory/connectToFacebook.aspx
etc.
I'd like the Facebook Connect authentication to work for all the developers.
Generally, the connect mechanism (login button with ajax dialog) does not work from localhost, as it requires a domain name.
Is it possible to make the Connect mechanism work - when watching the webpage from localhost? (or must I run the webpage be a publicly accessible domain name like dyndns?)

this tutorial shows you how to use the c# sdk w/ localhost. Hope that helps.

the easiest way is to make every dev on the team use the same url.
if u r using fb c# sdk, u can continue to use differnt url by implementing your own IFacebookApplication and depending on the request url change the appid and appsecret.

Related

How to host a download file on a website for an application

I believe wordpress has download limits (it'd probably crash your site if someone spammed download). A website like: multiloginapp provides you with the download, where as a website like winautomation provides you the download link through an e-mail.
How do I go about implementing something like that for an application I have created? The only solution that I know of would be to use an external provider and link that with a password
Or to perhaps do what Winautomation do and when you sign up to download the application, it send you an email where you click the link and it pings it to you
Any ideas as I'm keen to get my application out there.
UPDATED
So broken down:
1) Provide the link to download. [WordPress Download Manager]
2) OPTIONAL Use Pretty Links Wordpress. This ensures that you can make the link specific to your site
3) Use a hosting provider like sabercat. Honestly this is the issue here. I want to have a host provider ping me it. I can't use my own host yet but I feel like this is the last issue to address. Two problems with this: Security is lacking unless you can encrypt or provide a password. The other is credibility. Would you buy from a legitimate business that users SABERCAT to give you their application? Maybe.. but you get my point.
For hosting a file in WordPress site first of all you might need unlimited bandthwidth or a dedicated server so instead it's wise to use a free file hosting services

External website in .NET and Active Directory

I'm building a website and I need authenticate a User using Active Directory.
My website is on a different network and IP from the Server where the Active Directory is running (it is in a completely different network and domain).
I would like to know if is possible build an Login Page which could authenticate an User on a remote AD.
Thanks for your time.
One way of doing it would be to use LDAP to validate the supplied user credentials. Here is an example from Microsoft on how you could do it.
You should not deploy any web services on an Active Directory server.
You can use System.Directoryservices.Accountmanagement namespace classes (.NET 4) or using ADSI.
I had a similar situation to this, and the only way I could think to do it was like this:
Create a very small website on the server with Active Directory, which uses windows authentication
Have this website redirect to your main website, with some form of login key in the URL (best if generated on the fly) if the user authenticated.
Don't think there is any way for you to use the authentication over the external website other than along these lines.

Opening windows explorer via link

I want to provide a means to open up Windows Explorer (or at least view the directory contents) via an internal webpage I've developed for our business. There are several machines which we share over the internal network. I've provided a text entry field for allow the user to enter the folder path they want to associate with a given row in a DB table and I can store that info off and create the file://///10.10.5.10/Recipes/Pie link to the Pie recipe folder on one of our shared machines.
The link renders correctly on the page and if I copy the link info and paste it into the address bar it will display a navigable page in FireFox or open Windows Explorer if using IE.
However, the link does nothing if you click on it directly on my page. I suspect this might have something to do with security and the brower, right? I've seen a SharePoint page in someone else's system that did work, but I'd guess that has to do with some differences between SharePoint and a webpage in a browser. The work-around of right-clicking the link and copy/pasting it into another tab will work and I might have to live with this, but I was wondering if anyone had any suggestions or ways to deal with this issue. Perhaps I'm just doing something wrong, but I'm pretty sure it's browser-security related.
It seems for me as a pure Internet Explorer setting issue.
First of all I would recommend you better use UNC or DNS names in the path to the server instead of the usage of IP addresses: use file://///myserver/Recipes/Pie or file://///myserver.mydomain.com/Recipes/Pie instead of file://///10.10.5.10/Recipes/Pie.
Second you should better include the file://///myserver, file://///myserver.mydomain.com or even file://///10.10.5.10/ to the "Local intranet" or at least to "Trusted sites" zone:
Then you should verify the setting of the Security Zone to which you map the url. Look at the "Miscellaneous" group for the "Display mixed contain":
If you would has "Prompt" setting you will see the warning:
at every attempt to open the link file://///myserver/Recipes/Pie
If you would has some problems I recommend you to reset the IE settings in "Advanced" tab:
Most likely it's a permission issue.
ASP.net runs under the ASP.net process account. Look for the ASPNET user and apply permissions to the folder for the user in question.
It definitely sounds like a security issue. Try one or both of the following:
Try using impersonation to impersonate a domain user with sufficient priveleges to access explorer on the client's machine
If this is a small intranet application, give the application full trust on the client
Here's a link to a class you can use for impersonation - see my answer:
Invoke or call C# console app from C# web service?

Test Flex/Facebook Application localy

I´m new in Flex.
I'm trying to develop a Web Application integrated with Facebook.
I´m using Flash Builder 4.5 and the Adobe Facebook SDK.
The problem is that to test the application I need to upload the files to my webserver to avoid the facebook error.
I guess this is because Facebook only allows to run the application inside the domain that informed at my app page on Facebook.
Someone knows how can I test the application locally?
Best, Flávio
One way to test your application is to create a copy of your app on Facebook (i.e. register a new application), but set it up to point to localhost (i.e. your local development server). This will let Facebook send all the login redirects back to your local webserver rather than your current 'live' website.
It would help if you install a localhost webserver on your machine so you can run code locally. This will allow you to test your files on your own machine rather than having to upload them every time.
Set up a local web server (I like Apache, but IIS will work). with a virtual server and give it the same domain name as your production server. Use a hosts file to point the domain back to your own server.
You can also use Charles to record the web traffic, then build mock services that will provide that information.

Best way to create a sandbox area on my asp .net host

I would like to create a sandbox area on my hosting provider that only the client can see. For example the production website would be at www.domain.com. However, would it be possible to create a sandbox version of the website at www.domain.com/sandbox and only provide access to the client?
If so, what is the best method? Do I manually have to create a login page etc in the sandbox folder? Or, can I publish the test website in the sandbox area and restrict access through my hosting provider?
Generally a sandbox/staging/test version of your production site would be a complete duplicate of your production deployment, not just the login page.
You'd have a separate copy of the application and the database, and then serve it via another hostname/IP address or on an entirely different machine.
For instance, you could have www.domain.com and test.domain.com, each with the own isolated version of the software. This way your client can play as much as they want in the sandbox without fear of damaging the production environment.
To restrict access you could use access control lists in IIS to restrict the sandbox to a specific ip address (or range), or enable basic support on it with a username/password required security.

Resources