91
This problem happens when your asp.net application runs on web farms
Adding enableViewStateMac="false" to webform may solve the problem but it's not recommended.
BY IIS 7

Posted on 2:02 AM by Softminer and filed under
IIS
This problem happens when your asp.net application runs on web farms
Adding enableViewStateMac="false" to webform may solve the problem but it's not recommended.
BY IIS 7
<?xml version="1.0" encoding="UTF-8"?> <configuration> <system.web> <machineKey decryptionKey="xx,IsolateApps" validationKey="xxx,IsolateApps" /> </system.web> </configuration>To generate using Power shell use this instruction http://support.microsoft.com/kb/2915218 Copy and paster powershell script into file, while running you may get security error. To remove security try x86 Open C:\Windows\system32\cmd.exe Run the command powershell Set-ExecutionPolicy RemoteSigned x64 Open C:\Windows\SysWOW64\cmd.exe Run the command powershell Set-ExecutionPolicy RemoteSigned and to set back to default powershell Set-ExecutionPolicy Restricted Power shell Execution Policies
0
Posted on 1:02 AM by Softminer and filed under
C#
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; namespace WebApplication1.DateOfWeek { public partial class WebForm1 : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { string ret = GetStringFromWeek(); } private string GetStringFromWeek() { var d = DateTime.Now; System.Globalization.CultureInfo cul = System.Globalization.CultureInfo.CurrentCulture; var firstDayWeek = cul.Calendar.GetWeekOfYear( d, System.Globalization.CalendarWeekRule.FirstDay, DayOfWeek.Monday); int weekNum = cul.Calendar.GetWeekOfYear( d, System.Globalization.CalendarWeekRule.FirstFourDayWeek, DayOfWeek.Monday); int year = weekNum == 52 && d.Month == 1 ? d.Year - 1 : d.Year; switch(weekNum) { case 4: return "MA"; case 5: return "MB"; case 6: return "MB"; case 7: return "MB"; case 8: return "MB"; case 9: return "MB"; case 10: return "MB"; case 11: return "MB"; case 12: return "MB"; case 13: return "MB"; case 14: return "MB"; case 15: return "MB"; case 16: return "MB"; case 17: return "MB"; case 18: return "MB"; case 19: return "MB"; case 20: return "MB"; case 21: return "MB"; case 22: return "MB"; case 23: return "MB"; case 24: return "MB"; case 25: return "MB"; case 26: return "MB"; case 27: return "MB"; case 28: return "MB"; case 29: return "MB"; case 30: return "MB"; case 31: return "MB"; case 32: return "MB"; case 33: return "MB"; case 34: return "MB"; case 35: return "MB"; case 36: return "MB"; case 37: return "MB"; case 38: return "MB"; case 39: return "MB"; case 40: return "MB"; case 41: return "MB"; case 42: return "MB"; case 43: return "MB"; case 44: return "MB"; case 45: return "MB"; case 46: return "MB"; case 47: return "MB"; case 48: return "MB"; case 49: return "MB"; case 50: return "MB"; case 51: return "MB"; case 52: return "MB"; default: return "Default"; } return "test"; } private string GetDayoFWeek() { switch (DateTime.Now.DayOfWeek) { case DayOfWeek.Friday: return "F"; case DayOfWeek.Monday: return "M"; case DayOfWeek.Saturday: return "S"; case DayOfWeek.Sunday: return "M"; case DayOfWeek.Thursday: return "T"; case DayOfWeek.Tuesday: return "E"; case DayOfWeek.Wednesday: return "W"; } return "NO"; } } }
0
How to generate long life access token
1. First you need to create an App, for creating app go to https://developers.facebook.com
From menu App, choose Add a new app
when you created app you will have a App ID and App Secret key
2. Gerenerating short access token which is 1 hour valid
From menu choose Tools -> Access Token
then you have the "User Token"
3. Call facebook Api
Go to Tools-> Graph API explorer
for example /me?fields=id,name
would be https://graph.facebook.com/me?fields=id,name&access_token={access_token}
4. To generate 2 months valid access token, use following get request
https://graph.facebook.com/oauth/access_token? grant_type=fb_exchange_token& client_id={app-id}& client_secret={app-secret}& fb_exchange_token={short-lived-token}
app-id you get from step 1
app-secret you get from step 1
short-lived-token you get from step 2
5. Long life valid token
$facebook->api("/PAGE_ID?fields=access_token");
related links +
Posted on 2:58 AM by Softminer and filed under
Facebook
How to generate long life access token
1. First you need to create an App, for creating app go to https://developers.facebook.com
From menu App, choose Add a new app
when you created app you will have a App ID and App Secret key
2. Gerenerating short access token which is 1 hour valid
From menu choose Tools -> Access Token
then you have the "User Token"
3. Call facebook Api
Go to Tools-> Graph API explorer
for example /me?fields=id,name
would be https://graph.facebook.com/me?fields=id,name&access_token={access_token}
4. To generate 2 months valid access token, use following get request
https://graph.facebook.com/oauth/access_token? grant_type=fb_exchange_token& client_id={app-id}& client_secret={app-secret}& fb_exchange_token={short-lived-token}
app-id you get from step 1
app-secret you get from step 1
short-lived-token you get from step 2
5. Long life valid token
$facebook->api("/PAGE_ID?fields=access_token");
related links +
0
DECLARE @TransactionName varchar(20) = 'Transaction1';
BEGIN TRAN @TransactionName
Posted on 6:23 AM by Softminer and filed under
SQL
DECLARE @TransactionName varchar(20) = 'Transaction1';
BEGIN TRAN @TransactionName
.......
ROLLBACK TRAN @TransactionName;
0
Summary of Technical Summit (Keynote)
Visual Studio online for project management, TFS
http://aka.ms/vsosecurity (microsoft security)
Some Shortcuts in visual studio
--------------------------------------------------------
Track active item in Solution explorer
Navigate To (Ctrl+comma)
Scrollbar (User map mode for vertical scrollbar)
Ctrl F10 (Run to Cursor)
http://en.wikipedia.org/wiki/HTTP_pipelining
OWIN defines a standard interface between .NET web servers and web applications.
Katana - OWIN implementations for Microsoft servers and frameworks
Open application insights is analytics for online projects
--------------------Xamarin------------------------------
Xamarin forms is available for business accounts, On Xamarin forms standard control can be used and it will replaced by device user control, Xamarin forms dont have UI designer currently.
PCL = Portable class library as a share library in Xamarin project
Yumtoso is an example of Xamarin project which is online ( A universal App)
http://winstoredev.com/yumtoso-fastfood-app/
Xamarin generate pure Objective C code
NO IL-code
.Net runtime
Genymotion is an android simulator on MAC os
Mobile web app ui design
http://www.telerik.com/kendo-ui1
Apache Cordova is a set of device APIs that allow a mobile app developer to access native device function such as the camera or accelerometer from JavaScript. Combined with a UI framework such as jQuery Mobile or Dojo Mobile or Sencha Touch, this allows a smartphone app to be developed with just HTML, CSS, and JavaScript.
Bower.io is a package manager for web
ionic
npmjs package installer
http://www.visualstudio.com/en-us/explore/cordova-vs.aspx
Cross platform application
Tools for Apache Cordova Update: iOS Debugging & Windows 8.1 Support
Video Presentation
--------------------------------------------------------------------------------
asp.net Next version
http://www.asp.net/vnext
http://www.asp.net/vnext/overview/aspnet-vnext/vc
http://www.asp.net/vnext/overview/aspnet-vnext/aspnet-5-overview
http://msdn.microsoft.com/en-us/library/dn481095.aspx
Announcing ASP.NET features in Visual Studio 2015 Preview and VS2013 Update 4
Release management for visual studio 2013
----------------------------------------------------------------------
Some related video can be found on Channel 9 http://channel9.msdn.com/Events/TechEd/Europe/2014
News about .Net Open source
Summary of Technical Summit (Keynote)
Visual Studio online for project management, TFS
http://aka.ms/vsosecurity (microsoft security)
Some Shortcuts in visual studio
--------------------------------------------------------
Track active item in Solution explorer
Navigate To (Ctrl+comma)
Scrollbar (User map mode for vertical scrollbar)
Ctrl F10 (Run to Cursor)
http://en.wikipedia.org/wiki/HTTP_pipelining
OWIN defines a standard interface between .NET web servers and web applications.
Katana - OWIN implementations for Microsoft servers and frameworks
Open application insights is analytics for online projects
--------------------Xamarin------------------------------
Xamarin forms is available for business accounts, On Xamarin forms standard control can be used and it will replaced by device user control, Xamarin forms dont have UI designer currently.
PCL = Portable class library as a share library in Xamarin project
Yumtoso is an example of Xamarin project which is online ( A universal App)
http://winstoredev.com/yumtoso-fastfood-app/
Xamarin generate pure Objective C code
NO IL-code
.Net runtime
Genymotion is an android simulator on MAC os
Mobile web app ui design
http://www.telerik.com/kendo-ui1
Apache Cordova is a set of device APIs that allow a mobile app developer to access native device function such as the camera or accelerometer from JavaScript. Combined with a UI framework such as jQuery Mobile or Dojo Mobile or Sencha Touch, this allows a smartphone app to be developed with just HTML, CSS, and JavaScript.
Bower.io is a package manager for web
ionic
npmjs package installer
http://www.visualstudio.com/en-us/explore/cordova-vs.aspx
Cross platform application
Tools for Apache Cordova Update: iOS Debugging & Windows 8.1 Support
Video Presentation
--------------------------------------------------------------------------------
asp.net Next version
http://www.asp.net/vnext
http://www.asp.net/vnext/overview/aspnet-vnext/vc
http://www.asp.net/vnext/overview/aspnet-vnext/aspnet-5-overview
http://msdn.microsoft.com/en-us/library/dn481095.aspx
Announcing ASP.NET features in Visual Studio 2015 Preview and VS2013 Update 4
Release management for visual studio 2013
----------------------------------------------------------------------
Some related video can be found on Channel 9 http://channel9.msdn.com/Events/TechEd/Europe/2014
News about .Net Open source
0
This is the structure of Simple Ranorex project

In Login repository we can track the inputs on the page.

In Code Module we create instance of login repository, fill them up and navigate throgh the test

Test Suite contains test cases, there we have to add our exisitng test module to it, every test module can have only one databinding and test will run for rows you define.
Local varibles should be defined in the code module and they could bind to varibale in database.

This is the structure of Simple Ranorex project
In Login repository we can track the inputs on the page.
In Code Module we create instance of login repository, fill them up and navigate throgh the test
Test Suite contains test cases, there we have to add our exisitng test module to it, every test module can have only one databinding and test will run for rows you define.
Local varibles should be defined in the code module and they could bind to varibale in database.
0
Here is a good example of publish subscribe design pattern in c#
http://www.codeproject.com/Articles/34316/Topic-based-Publish-Subscribe-design-pattern-imple
Here you can read about Publish Subscribe design pattern
http://en.wikipedia.org/wiki/Publish%E2%80%93subscribe_pattern
WCF has already some method to implement it
http://www.codeproject.com/Articles/34333/Topic-based-publish-subscribe-design-pattern-imp
Here is a good example of publish subscribe design pattern in c#
http://www.codeproject.com/Articles/34316/Topic-based-Publish-Subscribe-design-pattern-imple
Here you can read about Publish Subscribe design pattern
http://en.wikipedia.org/wiki/Publish%E2%80%93subscribe_pattern
WCF has already some method to implement it
http://www.codeproject.com/Articles/34333/Topic-based-publish-subscribe-design-pattern-imp