现在的位置: 首页 > 综合 > 正文

ASP.NET FAQ

2012年11月19日 ⁄ 综合 ⁄ 共 12661字 ⁄ 字号 评论关闭

1. Development and Deployment Issues

  

   1.1 Why are Server control tags shown in the browser instead of the controls it represents?
   1.2 How To Repair ASP.Net IIS Mapping After You Remove and Reinstall IIS?
   1.3 Why do I get "HTTP 500" error (or "(DLL) initialization routine failed") in my browser?
   1.4 I have recently move my Web application from Windows 2k to Windows Server 2003. All works fine in Windows 2K but i am not able to view pages using Windows Server 2003?
   1.5 What are the Best practices for side-by-side execution of Framework 1.0 and 1.1?
   1.6 Can I have VS.NET and the Visual Studio 6.0 installed on the same machine?
   1.7 How should I check whether IIS is installed or not?
   1.8 In Visual Studio .NET, how do I create a new ASP.NET application for an existing ASP.NET project?
   1.9 Why do I get the error message "Server Application Unavailable The web application you are attempting to access on this web server is currently unavailable. Please hit the "Refresh" button in your web browser to retry your request."?
   1.10 In Visual Studio .NET, how do I create a new ASP.NET application which does not have a physical path under wwwroot?
   1.11 Why do I get the "Unable to find script libruary 'WebUIValidation.js'" error ?
   1.12 After installing .NET Framework SP1 the client side validations, or rather validator controls are not working?
   1.13 How to Configure the ASP.NET Version to use for Each Application(developed using 1.0 or 1.1)?
   1.14 How to Configure Different Versions of an ASP.NET Application Running on the Same Web Server?
   1.15 Why do I get error message "Internet Explorer cannot download MyPage.aspx from MyWebSite.com ..."?
   1.16 Why do I get error message "Unable to start debugging on the web server. The server does not support debugging of ASP.NET or ATL Server applications. ..."?

2. Basic

  

   2.1 What is ASP.NET?
   2.2 Why does my ASP.NET file have multiple <form> tag with runat=server?
   2.3 How to find out what version of ASP.NET I am using on my machine?
   2.4 Is it possible to pass a querystring from an .asp page to aspx page?
   2.5 How to comment out ASP.NET Tags?
   2.6 What is a ViewState?
   2.7 Where can I get the details on Migration of existing projects using various technologies to ASP.NET?
   2.8 What is the equivalent of date() and time() in ASP.NET?
   2.9 How to prevent a button from validating it's form?
   2.10 How to get the IP address of the host accessing my site?
   2.11 How to access the Parameters passed in via the URL?
   2.12 How to Set Focus to Web Form Controls By Using Client-Side Script?
   2.13 How to display a Wait page while a query is running?
   2.14 How to implement Form based Authentication in ASP.NET application?
   2.15 How to catch the 404 error in my web application and provide more useful information?
   2.16 Is there a method similar to Response.Redirect that will send variables to the destination page other than using a query string or the post method?
   2.17 What are the differences between HTML versus Server Control?
   2.18 How can I change the action of a form through code?
   2.19 Is there any control that allows user to select a time from a clock - in other words is there a clock control?
   2.20 How to Compare time?
   2.21 How To work with TimeSpan Class?
   2.22 Where can I get information on Cookies in ASP.NET?
   2.23 Does ASP.Net still recognize the global.asa file?
   2.24 How should I destroy my objects in ASP.Net?
   2.25 Are there resources online with tips on ASP to ASP.Net conversions?
   2.26 How do I publish my ASP.NET application to my ISP's web server?
   2.27 Why do i get error message "Could not load type" whenever I browse to my ASP.NET web site?
   2.28 Will the WebMatrix SqlDataSourceControl work with a MySQL connection?
   2.29 Can I combine classic ASP and ASP.NET pages?
   2.30 What is the difference between src and Code-Behind?
   2.31 How can I get the value of input box with type hidden in code-behind?
   2.32 I have created a .NET user control page (.ascx) but I cannot compile and run it.
   2.33 What is a .resx file?
   2.34 Is it possible to use a style sheet class directly on a control instead of using inline or page-level formatting ?
   2.35 Can I recieve both HTML markup for page and code in the ASP.NET web page's source code portion in the Web browser?
   2.36 Why can't I put <%@ Page Language="C " %> where at the top of an ASPX file and write my server-side scripts in C ?
   2.37 ASP pages that worked pefectly on Windows 2000 Server and IIS 5.0 do not work on Windows 2003 Server with IIS 6.0. ASP.NET pages work fine. Why?
   2.38 Why do I get error message "Error creating assembly manifest: Error reading key file 'key.snk' -- The system cannot find the file specified"?
   2.39 How to get URL without querystring?
   2.40 What is the best way to output only time and not Date?
   2.41 Do I have to compile code if I am changing the content of my aspx.cs file?
   2.42 How to grab the referring URL?
   2.43 My ASP code gives an error "Compiler Error Message: BC30289: Statement cannot appear within a method body. End of method assumed" when changed to .aspx?
   2.44 How can I save images ?
   2.45 How can I logout when using FormsAuthentication?
   2.46 Why do I get a blank page when I use Server.Transfer("page1.htm") to transfer to a different page?
   2.47 How to detect the User's culture?
   2.48 What is the difference between CurrentCulture property and the CurrentUICulture property?
   2.49 Can I read the hard disk serial # of the client computer using ASP.NET?
   2.50 What is xxx(src As Object, e As EventArgs)?
   2.51 What is the difference between Absolute vs Relative URLs?
   2.52 What is the difference between URL and URI?
   2.53 How to convert milliseconds into time?
   2.54 How to include multiple vb/cs files in the source?
   2.55 How to convert a string to Proper Case?
   2.56 How can I ensure that application-level variables are not updated by more than one user simultaneously?
   2.57 Why do I get the error message "System.InvalidOperationException: It is invalid to show a modal dialog or form when the application is not running in UserInteractive mode. Specify the ServiceNotification or DefaultDesktopOnly style to display a ...."?
   2.58 How to validate that a string is a valid date?
   2.59 Are namespaces and Class names Case Sensitive?
   2.60 How to convert string to a DateTime and compare it with another DateTime?
   2.61 How to get the url of page dynamically?
   2.62 How to convert user input in dMy format to Mdy?
   2.63 When the User is prompted a File Download dialogbox, if the user selects "Save" then the "Save as" dialog box is displayed. Is there any way for me to retrieve the filename and directory path specified by the user on the File Download dialog box?
   2.64 How to hide or show Controls in server side code?
   2.65 How to check if the user is using a secure or non secure connection?
   2.66 Is it possible to write code in many languages in one ASP.NET project?
   2.67 What is the difference between Response.Redirect() and Server.Transfer().
   2.68 How to get the hostname or IP address of the server?
   2.69 What is the meaning of validateRequest=true in .net framework1.1?
   2.70 What is the different between <%# %> and <%= %>?
   2.71 What permissions do ASP.NET applications posses by default?
   2.72 How can I specify the relative path for a file?
   2.73 How can I specify the "upload a file" input textbox in a form to be read only so that the user can click on the browse button and pick a file but they cannot type anything into the textbox next to the browse button.
   2.74 How to change the Page Title dynamically?
   2.75 Why do I get the error message "Object must implement IConvertible". How can I resolve it?
   2.76 Why is default.aspx page not opened if i specify http://localhost. I am able to view this page if i hardcode it as http://localhost/default.aspx?
   2.77 Can ASP.NET work on an NT server?
   2.78 Is it possible to migrate Visual InterDev Design-Time Controls to ASP.NET?
   2.79 How to automatically get the latest version of all the asp.net solution items from Source Safe when opening the solution?
   2.80 How to convert the datetime into a string for use in the SQL ' statement?
   2.81 How to make VS.Net use FlowLayout as the default layout rather than the GridLayout?
   2.82 Can I use a DataReader to update/insert/delete a record?
   2.83 What is the difference between Server.Transfer and Server.Execute?
   2.84 How to create a login screen in ASP.NET?
   2.85 How to format a Telphone number in the xxx-xxx-xxxx format?
   2.86 Can two different programming languages be mixed in a single ASPX file?
   2.87 Can I use custom .NET data types in a Web form?
   2.88 How can I have a particular Web page in an ASP.NET application which displays its own error page.

3. Debugging and Error Handling

  

   3.1 Why do I get Error message "Unable to Start Debugging" Error Message When You Send Debug HTTP Request?
   3.2 Why do I get the error message "Unable to start debugging on the web server..." when I debug?
   3.3 When I Debug ASP.NET Applications I get error message "Access Is Denied. Check the DCOM Configuration Settings for the Machine Debug Manager"?
   3.4 On Trying to Debug an application, by the F5 key I get the error: "Error while trying to run project: Unable to start debugging on the web server. Catastrophic failure"?
   3.5 How to configure my project for debugging ASP Code?
   3.6 In Visual Studio .NET, whenever I try to debug my ASP.NET application I'm not able to stop the debugger on my breakpoints. Why?
   3.7 Why do I get error message "Unable to start debugging on the web server. The debugger is not properly installed. Run setup to install or repair the debugger. Would you like to disable future attempts to debug ASP.NET pages for this project ? "?
   3.8 How do I debug JavaScript and other script code in my application using Visual Studio .Net?
   3.9 What are the different exception-handling approaches that can be used in ASP.NET?
   3.10 Why do I get error message "Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection"?
   3.11 Why do I get the Error Message "System.OutOfMemoryException: Exception of type System.OutOfMemoryException was thrown."?
   3.12 Why do I get the error message "Sql Server does not exists or access denied " whenever I try to access the data on Sql server?
   3.13 Why do I get error message "It is already opened exclusively by another user, or you need permission to view its data." when I try to open Access mdb?
   3.14 Why do I get the "HTTP 404 - File not found." error message as "The page cannot be found.The page you are looking for might have been removed, had its name changed, or is temporarily unavailable "?
   3.15 When I install the Microsoft .NET Framework 1.1 on a computer that is running Windows XP, and then you start Windows, the Welcome screen appears. This screen prompts me to click your user name to start Windows.Why?
   3.16 Why do I get the error message "System.InvalidOperationException: Application is restarting"?
   3.17 How can I see the Trace messages?
   3.18 I have installed ASP.NET hotfix and I find that Startup Type of the ASP.NET Session State Service is set to Manual.Why?
   3.19 Why do I get the error message "aspnet_wp.exe (PID: XXXX) was recycled because it was suspected to be in a deadlocked state "?
   3.20 How to display errors using Page_Error event of Page Object?
   3.21 How to redirect the user to the friendly error-handler page when an Application error occurs?
   3.22 How to Enable Remote Debugging on Windows XP Service Pack 2?
   3.23 Why do I get error message ""Parser Error Message: Access is denied: Source Error: Line xxx : ""?
   3.24 Why do I get the error message "A potentially dangerous Request.Form value was detected from the client "?
   3.25 How can I test performance of the Web application?
   3.26 How can I resolve the error message "Cannot access file '...' because it is being used by another process"?
   3.27 Why do I get the Compiler Error Message: "CS0246: The type or namespace name '...' could not be found (are you missing a using directive or an assembly reference?) "?
   3.28 Why do I get the error message "Compiler Error Message: CS1595"?
   3.29 I get error message at runtime "Value null was found where an instance of an object was required" when using Application state variables. why?
   3.30 I installed Windows 2003 Standard Edition, then VS.NET and SQL Server 2K with SP3. When I build web project connecting to the database in VS.NET, the compliler gives me the following error:Login failed for user 'NT AUTHORITY\NETWORK SERVICE',why?
   3.31 Why do I get error message "System.Threading.ThreadAbortException: Thread was being aborted" while using Response.Redirect?
   3.32 Why do I get the error message "BC30451: Name 'ConfigurationSettings' is not declared"?
   3.33 What is a parser error?
   3.34 Whenever I browse to one of my ASP.NET web pages, Internet Explorer keeps on asking me if I want to download it, or it just displays the ASPX source. Why?
   3.35 Why am I getting the error: "Type '(OleDb or SQL)Connection' is not defined."?
   3.36 Why do I get the Error message "Operation must use an updateable query"?
   3.37 When compiling I get "Could not copy temporary files to the output directory" or "The process cannot access the file because it is being used by another process" error messages. Why?
   3.38 Why do I get error message "Failed to Start Monitoring Directory Changes" when i try to browse ASP.NET page?
   3.39 Why do I get Compilation error "<Control> is not a member of <Page>"?
   3.40 How to see the Message in the Output window using ASP.NET?
   3.41 How can I use Tracing in Custom Components?

4. Miscellaneous

  

   4.1 How to get the currently logged in user?
   4.2 How to specify a line break in a Label's Text?
   4.3 How to convert a string to HTML format?
   4.4 How do I determine if the user clicked a "Submit" button twice in the page?
   4.5 How to write date-time values of fields in a dataset into xml in a specific format?
   4.6 What does "~" mean in ASP.NET applications?
   4.7 How can I reference simple DLL which contains one class but has no namespace assigned to it in an .aspx page?
   4.8 How do I specify the Japanese locale for the controls in my Japanese localized page?
   4.9 Why do some of the events on my page fire twice?
   4.10 How to remove the spaces in a given string?
   4.11 I get the error System.__ComObject when using recordset?
   4.12 Why do I get error "A generic error occurred in GDI+." when trying to save the bitmap file?
   4.13 How can I force a Save As dialog box from an ASP.NET Web page.
   4.14 In ASP.NET is there a control similar to Combobox in Windows forms?
   4.15 How to do text encryption and decryption?
   4.16 How can I trigger a submit on my form when the enter key is pressed?
   4.17 How to get list of all files in the directory?
   4.18 What is HttpHandler?
   4.19 How to get the size of a byte array?
   4.20 How to know the width and height in pixels of a given image programmatically?
   4.21

抱歉!评论已关闭.