Category Archives: .NET

.NET IIS Microsoft Networking

IIS does not allow downloading files from .mdb format.

add the following to the web.config as follows:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
  <system.webServer>
    <security>
      <requestFiltering>
        <fileExtensions allowUnlisted="true" >
          <remove fileExtension=".mdb" />
          <add fileExtension=".mdb" allowed="true"/>
        </fileExtensions>
      </requestFiltering>
    </security>
  </system.webServer>
</configuration>

MIME Type must be registered on IIS

.NET Microsoft

Register .Net Framework 4.0 in IIS

Check your .Net framework location , usually is

C:\Windows\Microsoft.NET\Framework\v4.0.30319

you can put this in a batch file ( “iisreg_fx4.bat” ):

REM "Changing to the Framework install directory"
cd /d C:\Windows\Microsoft.NET\Framework\v4.0.30319
echo "Stopping IIS"
iisreset /stop
rem regiis
aspnet_regiis -i
echo "Restarting IIS"
iisreset /start
echo "----------------------"
pause
.NET ASP.Net 2.0 Microsoft

ASP.NET Web Configuration Guidelines

.NET Framework 4

ASP.NET enables you to specify configuration settings that affect all Web applications on a server, that affect only a single application, that affect individual pages, or that affect individual folders in a Web application. You can make configuration settings for features such as compiler options, debugging, user authentication, error-message display, connection strings, and more.

Configuration data is stored in XML files that are named Web.config.

This topic describes the main configuration settings that you can make in the Web.config file. The topic contains the following sections:

read more »

.NET ASP.Net 2.0

ASP.NET 2.0 – Enter Key – Default Submit Button

One of the most annoying things in developing web pages is handling the “Enter key” for form submission. Enter key has been the favourite way users like to submit forms. Though we provide Buttons to click on, the easiest and intuitive way is that, I can enter some text, make some changes and then hit “Enter” to accomplish my submission.
“Enter” Key is handled in a little tricky way by uplevel browsers like Internet Explorer, when it comes to ASP.NET.

* If there is a single Textbox and single button, then it becomes straight forward, the button is submitted. However, the event code doesnt get executed, though the page postsback.

* If there are two or more, buttons, then it takes up the first button as the default button. However, it still doesnt execute the event handler but just refreshes the page.

You can supress the Enter key event using Javascript. But this would result in other undesirable effects like, any Enter key in the form i.e. within Text Area or basically where large text is entered, would be disabled.

The earlier work around was to associate a javascript function to each Button to verify the that the relevant button is submitted upon Enter key.

ASP.NET 2.0 introduces a wonderful work around for this. By simply specifying the “defaultbutton” property to the ID of the <asp:Button>, whose event you want to fire, your job is done.

The defaultbutton property can be specified at the Form level in the form tag as well as at panel level in the <asp:panel> definition tag. The form level setting is overridden when specified at the panel level, for those controls that are inside the panel.
read more »

.NET ASP.Net Microsoft

List of Request.ServerVariables

ALL_HTTP HTTP_CONNECTION:Keep-Alive HTTP_ACCEPT:*/* HTTP_ACCEPT_ENCODING:gzip, deflate HTTP_ACCEPT_LANGUAGE:sv HTTP_HOST:localhost:1229 HTTP_USER_AGENT:Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; InfoPath.1)
ALL_RAW Connection: Keep-Alive Accept: */* Accept-Encoding: gzip, deflate Accept-Language: sv Host: localhost:1229 User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; InfoPath.1)
APPL_MD_PATH
APPL_PHYSICAL_PATH D:\code\web\demos\membership\
AUTH_TYPE NTLM
AUTH_USER SYSTEMEN-D9AE02\Stefan Holmberg
AUTH_PASSWORD
LOGON_USER SYSTEMEN-D9AE02\Stefan Holmberg
REMOTE_USER SYSTEMEN-D9AE02\Stefan Holmberg
CERT_COOKIE
CERT_FLAGS
CERT_ISSUER
CERT_KEYSIZE
CERT_SECRETKEYSIZE
CERT_SERIALNUMBER
CERT_SERVER_ISSUER
CERT_SERVER_SUBJECT
CERT_SUBJECT
CONTENT_LENGTH 0
CONTENT_TYPE
GATEWAY_INTERFACE
HTTPS
HTTPS_KEYSIZE
HTTPS_SECRETKEYSIZE
HTTPS_SERVER_ISSUER
HTTPS_SERVER_SUBJECT
INSTANCE_ID
INSTANCE_META_PATH
LOCAL_ADDR 127.0.0.1
PATH_INFO /membership/servervariables.aspx
PATH_TRANSLATED D:\code\web\demos\membership\servervariables.aspx
QUERY_STRING
REMOTE_ADDR 127.0.0.1
REMOTE_HOST 127.0.0.1
REMOTE_PORT
REQUEST_METHOD GET
SCRIPT_NAME /membership/servervariables.aspx
SERVER_NAME localhost
SERVER_PORT 1229
SERVER_PORT_SECURE 0
SERVER_PROTOCOL HTTP/1.1
SERVER_SOFTWARE
URL /membership/servervariables.aspx
HTTP_CONNECTION Keep-Alive
HTTP_ACCEPT */*
HTTP_ACCEPT_ENCODING gzip, deflate
HTTP_ACCEPT_LANGUAGE sv
HTTP_HOST localhost:1229
HTTP_USER_AGENT Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; InfoPath.1)
.NET ASP.Net Microsoft

Custom paging nav on GridView control

<PagerTemplate>
      <asp:LinkButton CommandName="Page" CommandArgument="First"
        ID="LinkButton1" runat="server" Style="color: white">
        &lt;&lt;First</asp:LinkButton>
      <asp:LinkButton CommandName="Page" CommandArgument="Prev"
        ID="LinkButton2" runat="server" Style="color: white">
        &lt; Prev</asp:LinkButton>
      [Records <%= GridView1.PageIndex * GridView1.PageSize %>
        - <%= GridView1.PageIndex * GridView1.PageSize +
           GridView1.PageSize - 1 %>]
      <asp:LinkButton CommandName="Page" CommandArgument="Next"
        ID="LinkButton3" runat="server" Style="color: white">
        Next &gt;</asp:LinkButton>
      <asp:LinkButton CommandName="Page" CommandArgument="Last"
       ID="LinkButton4" runat="server" Style="color: white">
        Last &gt;&gt;</asp:LinkButton>
</PagerTemplate>
.NET ASP.Net Microsoft

ASP.NET Charting Control

Scott Gu blogged about the the free Microsoft Chart Controls for Microsoft .NET 3.5.

Microsoft recently released a cool new ASP.NET server control – <asp:chart /> – that can be used for free with ASP.NET 3.5 to enable rich browser-based charting scenarios:

Once installed the <asp:chart/> control shows up under the “Data” tab on the Toolbox, and can be easily declared on any ASP.NET page as a standard server control:

read more »

.NET ASP.Net 2.0

dasBLOG, plataforma de blogs Open Source em ASP.NET 2.0

dasblog

Características: read more »

.NET Web 2.0

Twitteroo: Twitter .NET API

twitteroo

Do you possess an undying urge to make something in .NET that can communicate with Twitter.com? Nicole and I sure do. That’s why we made Twitteroo. We figure that there are more people out there like we are, so we’ve made the TwitterooCore Library available for download.

.NET Microsoft Visual Studio

Visual Studio 2010 and .NET Framework 4 – released

Visual Studio 2010 and .NET Framework 4 focuses on the core pillars of developer experience, support for the latest platforms, targeted experiences for specific application types, and core architecture improvements.

Download link