Thursday, September 11, 2008

Cannot download mdb file in 2.0 - works in 1.1

Microsoft meant this to be a security feature so that IIS wouldnt hand out mdbs to anyone who knew/guessed the proper path/url. To disable this feature and re-allow mdbs to be served, log into the IIS Manager of the Webserver and do the following:
On the treeview, Right Click on the target website folder -> Properties
Under the "Directory" or "Virtual Directory" tab, go to "Configuration" Under the "App Mappings" tab, scroll down and find the ".mdb" extension in the list.
Click Remove. Apply and exit. Then go to Start -> Run -> cmd OR bring up the command prompt somehow, and type in "iisreset /restart" OR restart iis from the management console.
After IIS has been restarted, voila! Your website will now serve mdbs.

Ref: http://forums.asp.net/p/1022569/1393806.aspx

Tuesday, August 19, 2008

Friday, August 1, 2008

dotnet error solution

http://dotnet-error-solution.blogspot.com I put all the error and bug I encounter in developing dot net projects together with the solutions here.I also can help if you have DotNet programming problem.

Monday, July 28, 2008

Event ID: 17052 ,The log file for database 'tempdb' is full.Back up the transaction log for the database to free up some log space

Usually, tempdb (database name) fills up when you are low on disk space, or when you have set an unreasonably low maximum size for database growth.


Solution:
1.Open to create new query. type this 'ALTER DATABASE tempdb SET RECOVERY SIMPLE' with tempdb your database name. Then click execute (!)









2. Then right click on you database, choose Tasks>Shrink>Files
















3. Then, on 'File Type:', select 'Log''.







4. Then, on 'shrink action', choose 'Reorganize pages before releasing unused space'. Shrink file to 1MB(depends on you). Then click ok. Now the log should be shrunk.

ERROR: Invalid CurrentPageIndex value. It must be >= 0 and < the PageCount

Two Datagrid refering to one OnPageIndexChanged Sub. Example. Datagrid A has 1 page only. Datagrid B has 2 page. When try to go to page B's 2nd page, error occur. Because the OnPageIndexChanged Sub will call Datagrid A's 2nd page which does't exist.

Solution:
Create two different OnPageIndexChanged Sub. Make sure the name are different. Example code:

The Datagrid
< id="Datagrid1" runat="server">
AllowPaging="True" AutoGenerateColumns="False"
OnPageIndexChanged="NewPageClick" PageSize="10">

The Sub
Sub NewPageClick(ByVal sender As Object, ByVal e As DataGridPageChangedEventArgs) Datagrid1.CurrentPageIndex = e.NewPageIndex
End Sub
.

Request object error 'ASP 0104 : 80004005'

I got this from an online source.
IIS6.0 prevent the upload of files more than +200Kb. So you need to make some changes in the default IIS settings first.

Solution:
  1. Stop IIS Service
  2. Go to 'c:\Windows\System32\Inetsrv'
  3. Open 'metabase.XML'
  4. Find the line "AspMaxRequestEntityAllowed"
  5. Change the value to "1073741824" (This is 1GB. You can change to any value which suits your need)
  6. Save the file. Start IIS.