Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

»ñÈ¡ÕæʵIPºÍ´úÀíIP (asp.net C#)

³ÌÐò´úÂë
public static string GetRealIP()
{
string ip;
try
{
HttpRequest request = HttpContext.Current.Request;
if (request.ServerVariables["HTTP_VIA"] != null)
{
ip = request.ServerVariables["HTTP_X_FORWARDED_FOR"].ToString().Split(',')[0].Trim();
}
else
{
ip = request.UserHostAddress;
}
}
catch (Exception e)
{
throw e;
}
return ip;
}
»ñÈ¡´úÀíIP
³ÌÐò´úÂë
public static string GetViaIP()
{
string viaIp = null;
try
{
HttpRequest request = HttpContext.Current.Request;
if (request.ServerVariables["HTTP_VIA"] != null)
{
viaIp = request.UserHostAddress;
}
}
catch (Exception e)
{
throw e;
}
return viaIp;
}


Ïà¹ØÎĵµ£º

AccessÊý¾Ý¿âÔÚC#.netϵĴ洢·¾¶ÎÊÌâ

¼´Ê¹ÎÒ½«Êý¾Ý¿â·ÅÔÚÏîÄ¿ÄÚ½¨µÄÎļþ¼ÐdbÏ£¬¿ÉÊǽøÐд洢²Ù×÷µÄʱºò£¬Êý¾Ý±íûÓÐÈκα仯¡£ºóÀ´·¢ÏÖ´¢´æ¸Ä±ä·¢ÉúÔÚbin\\debug\\dbĿ¼ÏµÄÊý¾Ý¿âÖУ¬Õâ¸öÊý¾Ý¿âÊÇÔÚ³ÌÐòÔËÐÐʱ×Ô¶¯¸´ÖƹýÈ¥µÄ£¬¿ÉÊÇΪʲô´æ´¢±ä»¯Ã»Óз´Ó¦µ½ÍâÃæÏîÄ¿ÄÚµÄÊý¾Ý¿âdbÏÂÄØ£¿ÎÒÏëÁ¬½Ó×Ö·û´®ÖÐdatasourceÖеÄdatadirectory´æÔÚһЩÐþ»ú£¬ÓÚÊÇÎÒÕÒµ½Ò ......

Ò»¸ö¼òµ¥µÄASP.NET +ACCESS µÇ¼

Ê×Ò³£º
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head ......

C#: ÌáÈ¡ÍøÒ³ÖеÄjavascript´úÂë

public static void Main()
        {
            WebRequest req = WebRequest.Create("http://blog.csdn.net/xiaofengsheng");
            try
  & ......

asp.net·þÎñÆ÷°²×°

Ò»¡¢ÏÂÔØ dotnetfx.exe °²×°
¶þ¡¢×¢²áasp.net   C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis -i
Èý¡¢ÐÞ¸ÄASPXÀ©Õ¹Ö¸Ïò C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll
Æô¶¯Õ¾µã ¾Í¿ÉÒÔÁË ......

ASP.NET C# Éú³É¾²Ì¬Ò³Ãæ¼òµ¥·½·¨

ASP.NET C# Éú³É¾²Ì¬Ò³Ãæ¼òµ¥·½·¨
 
//Ô´ÂëÊÇÌæ»»µôÄ£°åÖеÄÌØÕ÷×Ö·û
            string mbPath = Server.MapPath("template.html");
            Encoding cod ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ