Take a look at http://learnsqlwithbru.com/2012/01/10/sql-server-database-filegroup-is-full-what-why-and-how/. The author stated it very clear. In short, the problem can be summarize into 3 cases: disable auto growth, data size is over the given limit, and not enough disk space available.
Pages
Profile
|
|
Hi, I'm Veerapat Sriarunrungrueang, an expert in technology field, especially full stack web development and performance testing.This is my coding diary. I usually develop and keep code snippets or some tricks, and update to this diary when I have time.
Nowadays, I've been giving counsel to many well-known firms in Thailand.
view more... |
Monday, June 25, 2012
Tuesday, June 19, 2012
Basic knowledge for Deploy a Website in IIS
- http://www.codeproject.com/Articles/28693/Deploying-ASP-NET-Websites-on-IIS-7-0
- http://www.codeproject.com/Articles/32210/Deployment-of-a-Website-on-IIS
These 2 links are helpful for a beginner to use IIS as a place to deploy a website.
Sunday, June 17, 2012
How to configure FTP Server in Windows Server 208 R2
After that, you may need to config the Passive Port Range for FTP Service which you can follow this instruction. It will show you steps, and explain what they are.
Create Global Unique Identifier (GUID) in C#
Similar to the previous post, Microsoft introduced another standard called Global Unique Identifier to create a unique key in order to use in applications.
It is pretty much easy as following lines of code:
It is pretty much easy as following lines of code:
Guid id = new Guid(); id = Guid.NewGuid(); Console.WriteLine(id.ToString());Now, you can enjoy creating GUID for your applications ^^.
Create Universal Unique Identifier (UUID) in Python
Most of the time when I write database related programs, I often think about how to create a good id because one of the good id characteristic is meaningless. It should has no meaning, to doesn't let anyone understand something behind this id.
In Python, we can easily create it by using uuid module that is included in Python standard library as following example:
In Python, we can easily create it by using uuid module that is included in Python standard library as following example:
import uuid ob = uuid.uuid4() print str(ob)There are 4 kinds of uuids in Python: uuid1(), uuid3(), uuid4(), and uuid5() that you can take a look for more details at http://docs.python.org/library/uuid.html.
How to handle "The path X is already mapped in workspace Y"
Take a look at http://blogs.msdn.com/b/buckh/archive/2006/09/12/path-is-already-mapped-in-workspace.aspx.
Shortly, you have to remove Team Foundation Server cache that store at "C:\Users\{User}\AppData\Local\Microsoft\Team Foundation\3.0\Cache" named "VersionControl.config". After, you remove it, Visual Studio won't remember the map path from your local path to source control server, then you can map that path to the new server freely.
Shortly, you have to remove Team Foundation Server cache that store at "C:\Users\{User}\AppData\Local\Microsoft\Team Foundation\3.0\Cache" named "VersionControl.config". After, you remove it, Visual Studio won't remember the map path from your local path to source control server, then you can map that path to the new server freely.
Labels:
IDE,
Source Control,
Team Foundation Server
Saturday, June 16, 2012
Run another exe process in C#
Run another exe process in C#
Sometimes, we may want to call other programs to do something in our program before going to do next step.
In C#, simply, by calling Process class in System.Diagnostics namespace.
This class has a lot of features as following examples:
- Enable/Disable new Window to launch new program.
- Redirect input/output and error stream to the main program.
- Run a process in synchronous or asynchronous.
- Receive arguments
In C#, simply, by calling Process class in System.Diagnostics namespace.
This class has a lot of features as following examples:
- Enable/Disable new Window to launch new program.
- Redirect input/output and error stream to the main program.
- Run a process in synchronous or asynchronous.
- Receive arguments
Labels:
C#,
Programming,
Windows
Wednesday, May 30, 2012
Embed Fonts in Windows Phone
To embed external fonts into Windows Phone, it is not difficult. First, you need to have fonts (*.ttf). Then, you add it into your Windows Phone project. Next, at your font properties, copy to output directory to copy if newer. Finally, in FontFamily property of your control. Refer to your font file followed by # then a font name, which contained in your font file.
// For example my font file name is RSU_Regular.ttf, and it is under fonts folder in my project.
// Refer to font name "RSU" which contained in RSU_Regular.ttf.
<UserControl ... FontFamily="fonts/RSU_Regular.ttf#RSU" ...>
...
</UserControl>
If you want to change control's font in C# file, you can do it by:
this.FontFamily = new FontFamily("fonts/RSU_Regular.ttf#RSU");
Labels:
C#,
Programming,
Windows Phone
How to generate List of Anonymous Types in C#
Normally, we can use List<T> when T is a strong type, then we can add Class T to that List. However, we can trick it by creating a method that receive generic type T, and create List of type T as a return.
// Tricky method to return anonymous List
public static CreateList<T>(T ob)
{
var list = new List();
return list;
}
// Create anonymous object, and let's generate our list
var person = new { Name = "Hello", Age = 10 };
var list = CreateList(person);
list.Add(person);
list.Add(new { Name="John", Age = 47 });
It is useful in some cases, but be careful that anonymous objects you created are read-only objects, we can't modify their data after we created them.
Friday, May 18, 2012
Create Chart using Chart Helper in ASP.NET MVC 3
To insert chart into a web page in ASP.NET MVC3, you can use Chart Helper which included in MVC 3. It will generate image chart dynamically that you can use generated chart to be the image soruce in image tag.
In cshtml page has an image element as follows:
In cshtml page has an image element as follows:
<!-- It will refer to /[Name]Controller/MyChart, and send back an image chart. -->
<img src="@Url.Action("MyChart")" alt="SimpleChart" />
Under your controller class, you create a MyChart method that return String in an image format (jpg/png) as an action.
public ActionResult MyChart()
{
var bytes = new Chart(width: 400, height: 200)
.AddSeries(
chartType: "bar",
xValue: new[] { "Math", "English", "Computer", "Urdu" },
yValues: new[] { "60", "70", "68", "88" })
.GetBytes("png");
return File(bytes, "image/png");
}
After that, you will get the chart image when requesting MyChart action.
Labels:
ASP.NET,
C#,
Internet Technology,
MVC,
Programming,
Windows
Subscribe to:
Posts (Atom)