asp.net

how to login directly into facebook using facebook api through my ASp.net webservice using c# ?

i created a mathod facebookInfo(string username,string password) ,so i received username and password but after receiving its not possible to login at server side,because ther is only one way to connect to facebook using facebook api ie. facebookservie.ConnectToFacebook(); and its open IE browser,so there is any way to login automatica...

Replacing the obsolete System.Xml.XmlDataDocument?

I have a System.Web.UI.WebControls.Xml control (Xml1) in a webforms app that I have upgraded from .NET 2.0 to .NET 4.0 I am getting two warnings from the code-behind page that I'd like to do something about. ... Dim ds As DataSet = app.GetObjects Dim xmlDoc As New System.Xml.XmlDataDocument(ds) Xml1.Document = xmlDoc Xml1.TransformSou...

How can I find a user's GEO Location using ASP.NET?

How can I get hold of a user's GEO location within my ASP.NET application? I've noticed on browsers like Firefox and Google Chrome, I (as the user) am prompted as to whether or not to allow the site to have access to my location. How can I achieve a similar thing to this? ...

Presenting different versions of an app dynamically

I maintain a web application that is painful to upgrade. It's not painful because the code is bad, but because there are a lot of devices connected to this application via the web and getting them to update their clients is a lot like moving concrete. So I had an idea that I could simply present a different version of the application t...

Squirrel machine key in user.config?

I have an app that I perform periodic updates. Each time I perform an update I have to replace the default machine key in the web.config with my custom machine key. The app also has a user.config file where a connection string and other application specific information is stored. Can I put the machine key in my user.config, and if so pro...

Create Password and Passwordsalt

I have an existing table that has 100 users and passwords. The data type is a varchar. I just created an asp.net mvc application and I want to convert the password to aspnet_membership table. How do I convert varchar password on SQL level as "Password" and "Passwordsalt" in aspnet_membership table? ...

Service Oriented real world sample application in ASP.NET

Hi, I've read lots of articles about Service Oriented architecture. Is there any real world sample application which is imeplemented in ASP.NET? Thanks ...

Reference in ASPX file is not working as in ASPX.CS file

I am using http://code.google.com/p/google-api-for-dotnet/ Google API for .NET. I added DLL file reference to project and address it using using Google.API.Search; Search.aspx.cs file and it works completely fine. using Google.API.Search; namespace ASP._8 { public partial class Search : System.Web.UI.Page { protected v...

How does WebResources.axd or ScriptResources.axd actually work?

Where can I learn how WebResources.axd or ScriptResources.axd actually works? What is the string that is appended to the .axd? Does this string change, or is it constant? Is it page, session specific? Can these files be cached on a proxy? How does it work internally? This is especially important after the ASP.NET vulnerability was ...

Nullable DateTime Parameter is never bound when calling the action

I have the following function signuture: public JsonResult PopulateGrid(int page, Guid? accountId, Guid? systemUserId, Guid? branchId, DateTime? fromDate, DateTime? toDate, HomeVisitType? homeVisitType) Every single parameter is bound just fine except toDate which turns out to be always null. When inspecting the Request.QueryString["t...

Get last activity after timeout in ASP.NET WebForms

I have an ASP.NET WebForms page with forms authentication. When users create a login, I use 'remember me' to create the authentication cookie. What I now want to do is check the time of their last access. But LastLogin time is updated only when the user uses the login control (which they don't need to use when they have the authenticati...

Page.IsValid always returning true with ValidationGroup and dynamic CustomValidator

Hi, I am adding a custom validator to the page programmatically on click of a button, then validating the page and checking the IsValid property of the page. but the IsValid property is always returning true. Please help. here is the code. I need to add custom validator dynamically to show validation messages from business object. I am s...

How to update entity objects without deleting ?

I have an entity generated from my database that contains one table. When i make changes in the DB i obviously would like these changes to reflected in my model. My current approach is to delete the item from the designer and then right-click - update model from database. This works for me at the moment. Is there a different approach t...

Reload xml file if change

I have an XML file and I save some of my application settings in that. I read this xml file and cache it in memory, If i change the setting i want to read the latest change from xml file but how can I know that, xml file is changed ? Im running this app in the web context (asp.net) ...

Page_Error vs Application_Error exception handlers

1) If we handle an exception inside page-level handler ( Page_Error ), then this page-level handler returns you back to the requested page, which is empty, since instances of control are not created. a) What’s the logic behind runtime not rendering any of the page's controls if exception is handled by Page_Error? b) So the only differ...

Problem with insert using asp.net, mysql and transactions

I'm using asp.net and MySql to insert data into a table using transaction. I loop through a list of items and inserts them to the table. This code runs quite often and the problem I am having is that sometimes when I insert data one of my parameters is null when inserted into the database but it shouldn't be null. I have started logging...

Random number generator returning zeros

I have an ASP.NET application that relies on the Random class to generate a pseudo-random string. It uses the following code (this is part of a larger piece of sample code provided by Google for apps SSO): public static class SamlUtility { private static Random random = new Random(); private static char[] charMapping = { ...

How can I intercept/get notified about asynchronous requests in ASP.NET?

Hi, I need to get notified about asynchronous requests in ASP.NET. I used the jQuery .ajaxSend global event but it does not trigger when using UpdatePanels. Any dieas? ...

MVC JSON actions returning bool

I had my ASP.NET MVC actions written like this: // // GET: /TaxStatements/CalculateTax/{prettyId} public ActionResult CalculateTax(int prettyId) { if (prettyId == 0) return Json(true, JsonRequestBehavior.AllowGet); TaxStatement selected = _repository.Load(prettyId); return Json(select...

How to change this code in to $.ajax so that I can display message after saving to the database?

Hello Friends, I am using this ccode right now.. <%using (Html.BeginForm("SaveNewServiceTypeCategory","ServiceTypeCategory")){ %> <table> <tr> <td>Service type category:</td> <td style="padding-left:5px;"> <input type="text" id="txtNewServiceTypeCategory" name="txtNewServiceTypeCategory" ...