The Star Display
Monday, September 22, 2014
Tuesday, August 19, 2014
VB.NET Datagridview sort a column
- DGV.Sort(DGV.Columns("datum"), System.ComponentModel.ListSortDirection.Ascending)
Thursday, August 14, 2014
best way to do connection and GetData
Public Shared Function GetData(Query As String) As DataTable
Try
Dim connString As String = WebConfigurationManager.ConnectionStrings("myConnectionString").ToString
Using con As New SqlConnection(connString)
Using cmd As New SqlCommand()
cmd.CommandText = Query
Using sda As New SqlDataAdapter()
cmd.Connection = con
sda.SelectCommand = cmd
Using ds As New DataSet()
Dim dt As New DataTable()
sda.Fill(dt)
Return dt
End Using
End Using
End Using
End Using
Catch ex As Exception
Return Nothing
End Try
End Function
Try
Dim connString As String = WebConfigurationManager.ConnectionStrings("myConnectionString").ToString
Using con As New SqlConnection(connString)
Using cmd As New SqlCommand()
cmd.CommandText = Query
Using sda As New SqlDataAdapter()
cmd.Connection = con
sda.SelectCommand = cmd
Using ds As New DataSet()
Dim dt As New DataTable()
sda.Fill(dt)
Return dt
End Using
End Using
End Using
End Using
Catch ex As Exception
Return Nothing
End Try
End Function
Tuesday, August 12, 2014
Code! MVC 5 App with Facebook, Twitter, LinkedIn and Google OAuth2 Sign-on (C#)
Link 1
http://www.asp.net/mvc/tutorials/mvc-5/create-an-aspnet-mvc-5-app-with-facebook-and-google-oauth2-and-openid-sign-on
Link 2
http://aspsnippets.com/Articles/Login-with-FaceBook-account-in-ASPNet-Website.aspx
Link 3
http://www.theroks.com/social-login-owin-authentication-mvc5/
some solutions
in the facebook App Page, goto the basic tab. find "Website with Facebook Login" Option.
you will find Site URL: input there put the full URL ( for example http://Mywebsite.com/MyLogin.aspx ). this is the URL you can use with the call like If the APP ID is 123456789
https://graph.facebook.com/oauth/authorize?client_id=123456789&redirect_uri=http://Mywebsite/MyLogin.aspx&scope=publish_actions
http://www.asp.net/mvc/tutorials/mvc-5/create-an-aspnet-mvc-5-app-with-facebook-and-google-oauth2-and-openid-sign-on
Link 2
http://aspsnippets.com/Articles/Login-with-FaceBook-account-in-ASPNet-Website.aspx
Link 3
http://www.theroks.com/social-login-owin-authentication-mvc5/
some solutions
in the facebook App Page, goto the basic tab. find "Website with Facebook Login" Option.
you will find Site URL: input there put the full URL ( for example http://Mywebsite.com/MyLogin.aspx ). this is the URL you can use with the call like If the APP ID is 123456789
https://graph.facebook.com/oauth/authorize?client_id=123456789&redirect_uri=http://Mywebsite/MyLogin.aspx&scope=publish_actions
Monday, August 11, 2014
Operation not Allowed error for files over 200kb in IIS. Error: 80004005
Operation not Allowed error for files over 200kb in IIS
Document ID: 2711HQ
Issue:
An 'Operation not Allowed' error occurs when Eudora Web Client is installed on IIS while trying to attach files over 200k. The error commonly associated with this problem is:
Request object error 'ASP 0104 : 80004005'
Operation not Allowed
<system.webServer>
<defaultDocument>
<files>
<add value="publish.htm" />
</files>
</defaultDocument>
<asp scriptErrorSentToBrowser="true">
<limits maxRequestEntityAllowed="10485760" />
</asp>
<staticContent>
<mimeMap fileExtension=".appcache" mimeType="text/cache-manifest" />
<mimeMap fileExtension=".mp4" mimeType="video/mp4" />
</staticContent>
<httpErrors errorMode="Detailed" />
</system.webServer>
Document ID: 2711HQ
Issue:
An 'Operation not Allowed' error occurs when Eudora Web Client is installed on IIS while trying to attach files over 200k. The error commonly associated with this problem is:
Request object error 'ASP 0104 : 80004005'
Operation not Allowed
Solutions
<system.webServer>
<defaultDocument>
<files>
<add value="publish.htm" />
</files>
</defaultDocument>
<asp scriptErrorSentToBrowser="true">
<limits maxRequestEntityAllowed="10485760" />
</asp>
<staticContent>
<mimeMap fileExtension=".appcache" mimeType="text/cache-manifest" />
<mimeMap fileExtension=".mp4" mimeType="video/mp4" />
</staticContent>
<httpErrors errorMode="Detailed" />
</system.webServer>
Subscribe to:
Posts (Atom)
