iOS 8 / Safari 8 not working with ASP.NET AJAX-Extensions

Beware that this solution is only applicable to .NET version < 4.0 So here it is… Working UA: Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.57 Safari/537.36 Not working UA: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/600.1.17 (KHTML, like Gecko) Version/7.1 Safari/537.85.10 The problem lies in the major version-change to AppleWebKit/600. ASP.NET … Read more

Sharing ASP.NET cookies across sub-domains

Set the property of Domain to .mydomain.example in each Cookies of two subdomains websites. Like: Response.Cookies[“test”].Value = “some value”; Response.Cookies[“test”].Domain = “.mysite.example”; In Site A: HttpCookie hc = new HttpCookie(“strName”, “value”); hc.Domain = “.mydomain.example”; // must start with “.” hc.Expires = DateTime.Now.AddMonths(3); HttpContext.Current.Response.Cookies.Add(hc); In Site B: HttpContext.Current.Request.Cookies[“strName”].Value

How to configure SMTP settings in web.config

By setting the values <mailSettings> section of the in the web.config you can just new up an SmtpClient and the client will use those settings. https://learn.microsoft.com/en-us/dotnet/api/system.net.mail.smtpclient.-ctor?view=net-6.0#system-net-mail-smtpclient-ctor Web.Config file: <configuration> <system.net> <mailSettings> <smtp from=”yourmail@gmail.com”> <network host=”smtp.gmail.com” port=”587″ userName=”yourmail@gmail.com” password=”yourpassword” enableSsl=”true”/> </smtp> </mailSettings> </system.net> </configuration> C#: SmtpClient smtpClient = new SmtpClient(); smtpClient.Send(msgMail); However, if authentication is needed, … Read more

MVC3 Valums Ajax File Upload

I figured it out. this works in IE and Mozilla. [HttpPost] public ActionResult FileUpload(string qqfile) { var path = @”C:\\Temp\\100\\”; var file = string.Empty; try { var stream = Request.InputStream; if (String.IsNullOrEmpty(Request[“qqfile”])) { // IE HttpPostedFileBase postedFile = Request.Files[0]; stream = postedFile.InputStream; file = Path.Combine(path, System.IO.Path.GetFileName(Request.Files[0].FileName)); } else { //Webkit, Mozilla file = Path.Combine(path, qqfile); … Read more

Unable to find the requested .Net Framework Data Provider in Visual Studio 2010 Professional

I have seen reports of people having and additional, self terminating node in the machine.config file. Removing it resolved their issue. machine.config is found in \Windows\Microsoft.net\Framework\vXXXX\Config. You could have a multitude of config files based on how many versions of the framework are installed, including 32 and 64 bit variants. <system.data> <DbProviderFactories> <add name=”Odbc Data … Read more

tech