|
My 2 cents here,
Your going to need a couple of decent web servers like a Dell T110 II to design your system on, build your web app and test it. There pretty cheap to acquire, and have nice speed, but it is up to date for current OS and supports virtualization and AES Encryption for SSL. Or one heck of a workstation like a 6 core Xeon to develop on, and build your virtual machines.
We have test servers in house that we spent months on for the design. We created a design in which we can just copy the stuff to a Public Web Hosting facility that supports our design.
So we went with server 2012 standard, created a hyper-visor server core, and created 3 virtual machines using server core, no GUI and partial GUI. One virtual runs the database server, the other the web server, and a backup server.
You can use VMWare in which I like, or the stock Hyper-V virtual machines. Once you dial in your virtual machine, you can copy the machine like a file copy, and upload the machine to a public web hosting facility.
So for the Public Hosting, we choose our internet provider, that has facilities in Las Vegas and Texas, in which they run blade servers with Hyper-V or VMWare. So we get a firewall, a blade server, and access to let's say 6 virtual machines that we can upload. So we upload and download virtual machines, back them up every couple of hours using something like Veeam, and can restore them in minutes if needed.
Regardless of what technology you choose, I think this is the way to go for 2014 and is the current way of the future.
I'm not that worried about being hacked by the neighbor, because you can really fine tune the firewall in server 2012, and limit access to domain members only.
|
|
|
|
|
Thanks for taking the time to explain your design and thought process. What isn't clear to me is whether you're putting the db server on the public host or keeping that local. If local, how responsive is you overall set up?
Also, how did you, or how would you, manage the tasks of setting up and administering all the logins?
|
|
|
|
|
Oh its on the public host.
The difference is that because your control the virtual servers, you can narrow the scope of conversation between the virtual web server and virtual database server by fine tuning the firewalls in the OS. You just run all the virtual servers on 1 or 2 physical boxes.
|
|
|
|
|
Don't take this the wrong way as I mean no offence, but my advice is that you either find someone who knows what they are doing and sub-contract this out yourself to them, or advise your client do so directly. If their data is sensitive and confidential then you are asking for trouble (for yourself and your client) by taking on this task without already having the appropriate skills.
|
|
|
|
|
No offense taken. It's obvious to me that this task requires knowledge and skills that I don't have. However, my ignorance is vast and I need to get SOME education about recommended approaches to this problem so that I can help my client get the appropriate help.
|
|
|
|
|
OK - well, what you/they want to achieve is perfectly possible. However, I'd be wary about anyone telling what is the "best" approach. There are dozens of technologies and approaches one could take. and the best one for any developer is that with which he or she is most familiar! Just one technical point: if you want to keep the database in the office, rather than host it elsewhere, you should ensure that both the web application and the office database have their own unique IP addresses - this will enable you (or your developer) to set firewall and database access rules that will greatly enhance the system's security.
|
|
|
|
|
I need to create a chat application (Audio & Video), where chat room and users to be called from Sqlserver.
I went through XSocket.Net,SignalR, and Silverlight each one has their own pro's and con's, could some one suggest which technology will help us to link chat with Sqlserver and do Text, Audio and Video chat.
Bala
|
|
|
|
|
You'll need to evaluate which technology allows you to do everything you need to do and then if there is more than one still left I would suggest you go with whatever technology you are more familiar with. If you still can't narrow it down start researching them online and looking at what other people are doing with them.
In the end, you just have to pick what works best for you.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
Hi All,
I'm using wkhtmltopdf.exe to convert HTML page to PDF. It is working fine when I run from solution and not working after hosting in IIS 7.5. I tried giving all permissions to that folder and tried with changing AppPoolIdentity but still not succeeded . Please can anyone help me to resolve the issue.
Below is the code that I'm using to convert html to pdf.
protected string WKHtmlToPdf(string Url)
{
try
{
var p = new Process();
string footerURL = ConfigurationManager.AppSettings["Footer"];
string fileName = "TestReport.pdf";
string switches = "-q -n";
switches += "--print-media-type ";
switches += "--margin-top 15mm --margin-bottom 15mm --margin-right 15mm --margin-left 15mm ";
switches += "--page--size A4";
switches += "--redirect-delay 100";
switches += " --orientation Landscape " + Url + " --footer-html " + footerURL + " " + fileName + "";
var startInfo = new ProcessStartInfo
{
FileName = Server.MapPath("~\\Utilities\\wkhtmltopdf.exe"),
Arguments = " --orientation Portrait " + Url + " --footer-html " + footerURL + " " + fileName,
UseShellExecute = false,
RedirectStandardOutput = true,
RedirectStandardError = true,
RedirectStandardInput = true,
WorkingDirectory = Server.MapPath("~\\Html")
};
p.StartInfo = startInfo;
p.Start();
p.WaitForExit(60000);
int returnCode1 = 0;
try
{
returnCode1 = p.ExitCode;
}
catch (InvalidOperationException)
{
}
p.Close();
return (returnCode1 == 0) ? fileName : null;
}
catch(Exception ex){
throw ex;
}
}
Thanks & Regards
Seema
|
|
|
|
|
What error are you getting?
|
|
|
|
|
IN IIS SET THE IDENTITY IN ADVANCED SETTINGS
|
|
|
|
|
Hello,
I'm not getting any error but exe is not running. IIS is skipping to runt this exe. When I checked in event viewer the following error is shown
Faulting application name: wkhtmltopdf.exe, version: 0.0.0.0, time stamp: 0x4d45bafa
Faulting module name: wkhtmltopdf.exe, version: 0.0.0.0, time stamp: 0x4d45bafa
Exception code: 0xc0000005
Fault offset: 0x010215e2
Faulting process id: 0x7d8
Faulting application start time: 0x01cfa4eadd31964f
Faulting application path: D:\WebApp\Utilities\wkhtmltopdf.exe
Faulting module path: D:\WebApp\Utilities\wkhtmltopdf.exe
Report Id: 1bece5af-10de-11e4-9508-005056c00002
The application hosted is on windows authentication.
Thank & Regards
Seema
|
|
|
|
|
Try two things (separately!):
1. run wkhtmltopdf from command-line
2. move wkhtmltopdf to bin folder of your site
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)
|
|
|
|
|
are you running in on a server core with no gui?
you need the minimum gui to run shell command apps in the cmd window, or else it executes and never does anything.
|
|
|
|
|
The story is like a working team is bulit up, and I need to record the team's id,the members' names in my table. The members' names are shown on the Listbox which id is "Listbox2", and the team's id is shown on the label which id is "Label". I want to insert the data into the database, but I was fault.
Here is my code.
string SqlTxt = "";
for (int i = 0; i < ListBox2.Items.Count; i++)
{
ListBox2.Items[i].Selected = true;
SqlTxt += "INSERT INTO [TABLE] (id, name, identity) VALUES(@ID, @NAME, '0' " + i + ") ;";
}
using (SqlConnection Conn = new SqlConnection(WebConfigurationManager.ConnectionStrings["testConnectionString"].ConnectionString))
{
SqlCommand Cmmd = new SqlCommand(SqlTxt, Conn);
Cmmd.Connection.Open();
int y;
for (y = 0; y < this.ListBox2.Items.Count; y++)
{
if (y == 0)
{
Cmmd.Parameters.Add("@D", SqlDbType.NVarChar);
Cmmd.Parameters["@ID"].Value = Label.Text;
}
Cmmd.Parameters.Clear();
Cmmd.Parameters.AddWithValue("@NAME", this.ListBox2.Items[y].ToString());
}
Cmmd.ExecuteNonQuery();
}
I want to insert the items of listbox into database. What should be the changes in my code. Please help me and thank You.
|
|
|
|
|
1) Why can't you google it up for this very simple issue? It takes only half a second to get the answers.
2) It's always a bad practice to write inline Sql Queries, as it leads to injection.
3) Now, in your code shown above, the code
ListBox2.Items[i].Selected = true;
SqlTxt += "INSERT INTO [TABLE] (id, name, identity) VALUES(@ID, @NAME, '0' " + i + ") ;";
will always end up in inserting only one value, because it replaces new value on the next iteration. So what you can do is, you can create a BO(businessoobject) and convert that into a list, and pass that list to the database. You can call a stored proc instead of inline query. Stored proc will handle the list of input params. You can make the input character as an xml paramter as explained in this example or pass a comma separated string as explained in this example.
|
|
|
|
|
Sorry and Thank You Sir,
I did search by google but didn't find out and try the right thing...
I think it may be complex to with Stored Procedure. Maybe I can only design a for loop to make SQL clause to make the data insert into the database one by one. That is my initially idea.
Thank you your suggestion again.
I well still to try in the right way.
|
|
|
|
|
It will not be complex in any way with Stored Procedure. You can use xml paramter in Stored proc and use that in your C# code to pass the parameter to stored proc. One thing is you need to create an xml doc with your C# code. If that is tough, create a simple datatable with required columns and rows, convert that to xml and then you can use that in your stored procedure. An example for this is:Stored Procedure takes Xml as input parameter. Or Try use with Linq queries. That will be so easy
Another Example : Pass XML as Parameter from C# to SQL Stored Procedure This example is for select, you can write insert statements instead.
Creating a loop and putting Sql statements inside that loop is much inefficient and less secure.
|
|
|
|
|
|
how to store text -box value in database
|
|
|
|
|
|
Hi All,
I am trying to write a application where i want to access a virtual directory and save those list of files in local drive.I am bit new to write such application .can anybody help me providing a code snippet for doing such things.
Thanks
Pulkit
|
|
|
|
|
Actually speaking, saving files in a virtual directory is a bad practice. If the file size becomes too large, it will affect the performance. It should be save some where in network folder. However, you can have a look at the following for saving files in virtual directory:
1) Example1
2) Example 2
|
|
|
|
|
Receiving requestTimeOut error on 200 concurrent users
|
|
|
|
|
Sounds like you need to increase capacity of your servers, implement clustering, improve the performance of your code, or any of the combination of options.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|