Windows 2012 Hosting - MVC 6 and SQL 2014 BLOG

Tutorial and Articles about Windows Hosting, SQL Hosting, MVC Hosting, and Silverlight Hosting

SilverLight Hosting - ASPHostPortal.com :: WCF RIA Services

clock August 22, 2016 19:39 by author Armend

RIA Services mainly targets Business Application Development, and comes across good for this purpose from a few different angles.

  • RIA Services simplifies the traditional n-tier application pattern by bringing together the ASP.NET and Silverlight platforms. If you have ever gone through the motions of creating a WCF Service, and then adding a service reference to your Silverlight project you will quickly find that the service calls are all asynchronous, and require you to specify an OnRequestCompleated method for calls that you make to that web service. While there are asynchronous programming patterns out there most business application developers prefer the tried and true N-Tier approach. Asynchronous Method calls make N-Tier Architecture difficult
  • As stated above Ria simplifies tiered architecture this means it is a great choice for creating applications using some of the more popular architectural patterns like MVVM, and MVC.
  • Because RIA Services is from Microsoft, you get tight Visual Studio Integration, and lots of Blogs, and Documentation covering it's use. While some of the open source projects out there are pretty good, most lake adequate documentation and have a steep learning curve.
  • Ria Services is flat out great for Rapid Application Development. There is Code Generation generation built into Visual Studio to generate Domain Services directly from ADO.NET Entities Models that your Silverlight applications can consume.

Where Can I Get WCF RIA Services

You can Get Wcf Ria Services From the Microsoft Web Platform Installer, located here.

  1. Highlight the Web Platform Tab
  2. Scroll Down to Tools
  3. Click the customize Tab
  4. and check off what you need

If you don't have Visual Studio go ahead and check off to get the Express Version. You obviously want to get the RIA Services Toolkit, and while you're here get the the Silverlight 4 Toolkit, and Tools for Visual Studio as well. After the install completes you will have everything you need to work with Silverlight 4 and RIA Services from within Visual Studio.

 

Options for Integrating WCF RIA Services into your Projects

There are a few different way out of the box to integrate WCF RIA Services into your projects using Visual Studio

  • Using the Silverlight Business Application Project Template
  • RIA Services in the Silverlight Application Project Template
  • Using the RIA Services Class Library Project Template

In this post we take a look at each of these approaches, talk about when and how they are useful, and show how implement each one. For this purpose I have created a Visual Studio Solution containing each implementation listed above
In the real world you are not likely to have a solution which implements any combination of these approaches, but for this example it is nice to have them all in one place to look at.

The Silverlight Business Application Project

If you are creating an application that requires Login, Registration, and User Authentication the Silverlight Business Application Project Template is a good way to go. It includes all this right out of the box. It also has website like layout and styles you can customize and some useful helper methods. You can actually learn a few things just by creating this project and then giving it a gook look over.

To create a Silverlight Business Application:

Right Click on your Solution and select "Add New Project", Select "Silverlight" from the Tree Menu on the Left, and then Select "Silverlight Business Application".
This will create a new two Projects in you solution automatically
You now have a Web Application Project to host your Silverlight Application and Domain Services, and The RIA Link between the two projects is all set up so you can begin adding and consuming WCF RIA Services. If you run the project now you will see all the out of the box features I mentioned are there.

  • Configurable Layout and Styles
  • Login
  • Registration

Not bad for right out of the box. I do have a couple of small issues with this though. Sure, it's great Microsoft has given us all this stuff without having to write a single line of code, but, I would have a couple things different if it were up to me.

  • 1. I wish the project template had a few config options upon creation. For example, for larger projects I may want all my services to be in a WCF RIA Services Class Library (RIA Class Library covered in detail below) in  instead of in the Web Application Project. Now I would have to move them.
  • 2. I'm not really sure what kind of Architectural Pattern they are trying to implement here. As you can see from the image of the Solution Explorer above there is a folder named "Models" in both the Web Application Project, and in the silverlight project. Then there is a Views folder in the Silverlight project that has views in it, but then no ViewModels or Controllers. Okay, so my point is what are they going for here? It makes me want to start moving the code around. If I'm not alone on this please leave me a comment. Anyway, small issues compared to the big picture.

WCF RIA Services Enabled Silverlight Application

If you don't need all the stuff that's included in the Silverlight Business Application above, or plan to just write them yourself, you can also enable RIA Services in a regular silverlight application.

To create a WCF RIA Services Enabled Silverlight Application:

Right Click on your Solution and select "Add New Project", Select "Silverlight" from the Tree Menu on the Left, and then Select "Silverlight Application".
When you click OK to add the new Silverlight Application a Dialog will appearer allowing you create a New Web Application to host your Silverlight Application in, or to host your Silverlight Application in an existing Web Project. Either way all you need to do is check the box to "Enable WCF RIA Services".
Then when your Project is created, it will already be set up to use RIA Services. You can now start adding domain services to your web project and the RIA link is in place and ready to go.

WCF RIA Services Class Library

The last option is the WCF RIA Services Class Library. In my experience the more separation you have in your solution the better. This project template allows you to house your Domain Services in separate assemblies.

To create a Solution that uses a WCF RIA Services Class Library:

Right Click on your Solution and select "Add New Project", Select "Silverlight" from the Tree Menu on the Left, and then Select "Silverlight Application".
When the project Dialog box appears allowing you to host your silverlight application in an existing or new Web Application, leave the "Enable WCF RIA Services" checkbox UN-CHECKED. The RIA Link will exist in the RIA Services Class Library.

Now right Click on your Solution and select "Add New Project", Select "Silverlight" from the Tree Menu on the Left, and then Select "WCF RIA Services Class Library".
This will actually create two projects. The RIA Services Class Library Consists of a Windows Class Library and a Silverlight Class Library and the two projects created contain the RIA Link. The project ending in .Web is the Windows Class Library and will run on the server while the other is the Silverlight Class Library will run on the client. Your solution should now look something like this.
All you need to do now is:

  • Add a reference to the Silverlight Class Library in your Silverlight Application
  • Add a reference to the Windows Class Library in your Web Application

And you are now set up and ready to start adding Domain Services to your server project for consumption in your Web Project. When using this set up you should add your domain services to you Windows Class Library section of your RIA Services Class Library.

Creating and Consuming Domain Services

Now that we know how to set up our RIA Services Project, Lets take a look at adding a Domain Service and consuming it in out Silverlight client to test that we have everything wired up correctly. In all of the scenarios listed above you will always add your Domain Service on the server side and consume that service on the Silverlight Client.
To show you how quick and easy it is to get a Domain Service up and running we are going to create a Domain Service form and ADO.NET Entities Data Model.

  • Start by Creating a Database. Mine consist of only one table with a very simple schema for this example.
  • Now right Click on your Web Project and select "Add New Item", Select "Data" from the Tree Menu on the Left, and then Select "ADO.NET Entity Data Model".
  • Highlight "Generate From Database" and click "Next".
  • Select your Target Database and click "Next".
  • Select the tables you want to generate the Model from and click "Finish".
  • Now that your Entities Data Model has been created do a Rebuild on the project before you do any thing else. This is important because if you forget to rebuild what will happen is when you go to create the Domain Service it will not be able to find your Entities. So go ahead and rebuild now and then we can create out first Domain Service.
  • Now right Click on your Web Project and select "Add New Item", Select "Web" from the Tree Menu on the Left, and then Select "Domain Service Class".
  • Click "Add" and you will get a Dialog Box Allowing you to generate your Domain Service from your entities. Select Enable Editing if you want it to Generate Update, Insert and Delete methods as well.
  • Now Click "OK" and it will generate your Domain Service class. It will look something like this.


[EnableClientAccess()]  
    public class ContactDomainService : LinqToEntitiesDomainService  
    {    

        // TODO:  
        // Consider constraining the results of your query method.  If you need additional input you can  
        // add parameters to this method or create additional query methods with different names.  
        // To support paging you will need to add ordering to the 'Contacts' query.  
        public IQueryable GetContacts()  
        {  
            return this.ObjectContext.Contacts;  
        }    

        public void InsertContact(Contact contact)  
        {  
            if ((contact.EntityState != EntityState.Detached))  
            {  
                this.ObjectContext.ObjectStateManager.ChangeObjectState(contact, EntityState.Added);  
            }  
            else 
            {  
                this.ObjectContext.Contacts.AddObject(contact);  
            }  
        }    

        public void UpdateContact(Contact currentContact)  
        {  
            this.ObjectContext.Contacts.AttachAsModified(currentContact, this.ChangeSet.GetOriginal(currentContact));  
        }    

        public void DeleteContact(Contact contact)  
        {  
            if ((contact.EntityState == EntityState.Detached))  
            {  
                this.ObjectContext.Contacts.Attach(contact);  
            }  
            this.ObjectContext.Contacts.DeleteObject(contact);  
        }  
    }

Notice it created services methods to preform all the CRUD opperations we need against our Database.
Now in our Silverlight project we will create a Grid in our MainPage.xaml to display our data like so:

<sdk:DataGrid x:Name="DataGrid" Margin="12" AutoGenerateColumns="True" />

Then in the code behind (MainPage.xaml.cs) we will add the code to call our domain service and populate our grid.

  • You will need to add a using directive to the Namespace in your server project where your domain services are located.
  • Create a private instance of your DomainContext
  • In the constructor call the load method of your context and pass in your GetContactsQuery from your Domain Service
  • Set the ItemSource Property of your DataGrid to the Collection of Contacts now available in your DataContext.

using SilverlightApplication3.Web;    
namespace SilverlightApplication3  
{  
    public partial class MainPage : UserControl  
    {  
        private ContactDomainContext _context = new ContactDomainContext(); 

        public MainPage()  
        {  
            InitializeComponent();  
            _context.Load(_context.GetContactsQuery());  
            DataGrid.ItemsSource = _context.Contacts;  
        }  
    }  
}

Now hit F5 and run the application. TADA! You should now see your data in the grid!
I hope this helped you in getting started with .NET RIA Services. I will be covering more in future posts.



Windows Server Hosting - ASPHostportal.com :: Tips to Help Diagnose and Prevent Windows Server Crashes

clock August 15, 2016 20:12 by author Armend

Simple Tips to Help Diagnose and Prevent Windows Server Crashes

In an enterprise setting, server failures are never an issue to be taken lightly. Since servers are the backbone of most modern operations, being able to pinpoint the cause of errors rapidly is an essential skill for any Windows server administrator. Fortunately by following a few simple steps you can easily pinpoint the cause of most Windows Server errors.

 

Best Practice Analysis Automation

In Windows Server 2008 R2, Windows Server 2012 and Windows Server 2012 R2, Microsoft has included a tool known as the Best Practices Analyzer (BPA). BPA is an automated scanner which when run will check your server to ensure that it is configured for optimal performance, reliability and maximum security. While this tool is not a substitute for keeping atop of Windows Server trends, BPA helps to ensure that the most commonly exploited violations are blocked on your servers.

Proactive Actions to Simplify Troubleshooting

Enable Kernel Crash Dumps

One of the most important debugging tools within Windows is the kernel crash dump file. This file typically contains all the information necessary to pinpoint the cause of a server issue. Unfortunately this feature isn’t configured by default, making it crucial that you enable this feature before experiencing issues.
To enable this feature, follow the steps below:

  • Go into:  Control Panel > System and Security > System.
  • Click Advanced system settings.
  • Under Startup and Recovery, click Settings
  • In the box that pops up, under Write Debugging Information you can specify the location for the crash dump file
    • Additionally you can have crashes added to the Windows Event Log, and you can also trigger a restart automatically upon a crash

After configuring the Windows crash dump settings, you will need to setup Windows to enable your keyboard to cause a system crash.
With PS/2 keyboards, you must take the following steps:

  • In the registry key HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\i8042prt\Parameters, create a value named CrashOnCtrlScroll
  • Set it equal to a REG_DWORD value of 0x01.
  • Restart your system

With USB keyboards, you must take the following steps:

  • In the registry key HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\kbdhid\Parameters, create a value named CrashOnCtrlScroll
  • Set it equal to a REG_DWORD value of 0x01
  • Restart your system

Windows Debugging Tools

To help with common issues that might come up as a server administrator Microsoft has released multiple debugging tools to make the job easier.

Sysinternals Suite

The Sysinternals suite is like a Swiss Army knife for your troubleshooting efforts. This collection of seventy tools maintained by Microsoft ensures that you can easily pinpoint the source of virtually any error and take action accordingly. While this suite is best installed on a thumb drive to be used when errors occur, you can also load this suite on your servers early on as a proactive measure.

While there are many tools within the suite, there are a couple which you should keep on mind;

  • Disckmon – this tool monitors, logs and displays all hard disk activity on a Windows system. By using this tool, you can better pinpoint errors which might be caused by pending hard disk failures.
  • Procdump – this tool allows you to monitor applications for CPU spikes and generating crash dumps during a spike. Additionally the tool can serve as a general dump utility which can be included in other scripts. By using this tool, you can greatly expedite the process of diagnosing troublesome applications and figuring out where to start debugging efforts.
  • TCPView – this tool allows you to view detailed listings of all TCP and UDP endpoints on your system. By using TCPView, you can pinpoint server issues to specific ports, allowing you to more in-depth action accordingly.

Windows Memory Diagnostics

Since RAM is one of the most used components of any server, many system failures often are due to memory-related matters. While typical memory issues involve applications using too much resources, or a process running out of control, failing hardware also can be responsible for system crashes. Fortunately you can easily diagnose potential memory trouble spots by using the Windows Memory Diagnostics tool built into most modern Windows Server editions.

  • To use this tool, simply open the command prompt and use the following command C:\mdsched
  • From there, you should follow the prompts to complete the diagnostic process.

The Importance of Backups

Even with the best tools and skills, occasionally a professional will encounter an issue which is beyond repair. When situations such as these occur, having a solid backup system always pays off. Although there are many backup tools on the market, Windows has a backup tool built in which can be used to protect yourself from even the worst disasters.
For details on implementing Windows Backup in windows Server 2008 and Windows Server 2012, Microsoft has documentation here.

Clustering as a way to Mitigate Risks

Server clustering is the process of having a group of independent servers working together as a single system to deliver more reliability to your users. Such arrangements are designed to protect against the following types of failure:

  • Applications and service failures which can affect software and essential services
  • System and hardware failures which can affect low level server components
  • Site failures in multisite organizations  which can be caused by natural disasters and other significant situations
  • By using clustering, you can ensure that when disaster strikes, your systems can continue operating instantly by shifting responsibility from the failed systems to the functional ones.

Conclusion

Although there are many variables which impact the reliability of your Windows servers, by focusing on proactive actions to mitigate damage you can avoid the difficulties of troubleshooting server issues. Even with the best precautions however, failures still occur, which is why you should familiarize yourself in advance with the technologies Windows provides to make the debugging process much easier.

Best Windows Server 2012 Hosting Recommendation

ASPHostPortal.com

ASPHostPortal.com provides our customers with Plesk Panel, one of the most popular and stable control panels for Windows hosting, as free. You could also see the latest .NET framework, a crazy amount of functionality as well as Large disk space, bandwidth, MSSQL databases and more. All those give people the convenience to build up a powerful site in Windows server 2012. We offers Windows hosting starts from $5/month only. We also guarantees 30 days money back and guarantee 99.9% uptime. If you need a reliable affordable Windows server 2012 Hosting, we should be your best choice.



SilverLight Hosting - ASPHostPortal.com :: How To clean up Broken SilverLight Installation

clock August 8, 2016 19:38 by author Armend

How To clean up Broken SilverLight Installation

In this article we will show you several tips to clean up broken silverlight after installation.  If Silverlight isn't working for you and you are getting errors trying to either uninstall, reinstall or upgrade Silverlight the steps below might help you. Note that I'm not listing all the steps to remove every trace of Silverlight from your machine. These steps are just meant to clean up enough so that future attempts to install, upgrade or uninstall don't fail.


Standard warnings about editing your registry apply. Be careful that you only delete what I say to delete below. If you delete too much by accident it is quite likely that you will break something and there is no way to undo accidental changes.

Steps to clean up a machine to fix a broken Silverlight installation:

  • In the Control Panel, open the Add/Remove Programs applet (Programs on Vista) and uninstall Microsoft Silverlight if it is shown as installed by clicking on it and then clicking Uninstall or Remove. If you get an error on this step (for example a dialog saying that the msi file cannot be found), just continue on to the next step
  • Using regedit, navigate to HKLM\Software\Microsoft\Silverlight and delete the key.
  • From an administrator command shell you can do this by running:

reg delete HKLM\Software\Microsoft\Silverlight /f

  • Using Windows Explorer, delete the “Microsoft Silverlight” directory from under Program Files.
  • From an administrator command shell on an x86 you can do this by running:

rmdir /s /q "%ProgramFiles%\Microsoft Silverlight
If you are on a 64-bit version of Windows, substitute ProgramFiles(x86):
rmdir /s /q "%ProgramFiles(x86)%\Microsoft Silverlight

ASPHostPortal.com

ASPHostPortal.com provides our customers with Plesk Panel, one of the most popular and stable control panels for Windows hosting, as free. You could also see the latest SilverLight hosting, a crazy amount of functionality as well as Large disk space, bandwidth, MSSQL databases and more. All those give people the convenience to build up a powerful site in Windows server 2008. We offers Windows hosting starts from $5/month only. We also guarantees 30 days money back and guarantee 99.9% uptime. If you need a reliable affordable Windows server 2008 Hosting, we should be your best choice.

 



Windows Hosting - ASPHostPortal.com :: How to Reset Admin Password in Windows Server 2012 R2

clock August 1, 2016 19:59 by author Armend

How to Reset Admin Password in Windows Server 2012 R2

Windows Server 2012 R2 brings a host of new features that greatly enhance the functionality of the operating system. Many of these improvements expand on existing capabilities of Windows Server 2012.  The new product also benefits from having the capability of performing at a much higher level than previous servers and comes equipped with an integrated virtualization platform.

 

In this article I will tell you about how to reset Windows Server 2012 R2 lost admin password. The answer is not absolute. For example, if you have password reset disk or another administrator available, Windows server 2012 r2 lost admin password would be reset instantly.
Or if you have backup Windows system status with disk, such as Windows system restore disc, you could restore Windows server 2012 r2 to early system point.
Even though there are not anything available for recovering server 2012 r2 password, Windows system 2012 r2 installation disk and third-party recovery tool would help you too.

First, Windows system installation disk reset Windows server 2012 r2 admin password.
Preparation: a copy of Windows server 2012 r2 installation disk
The key step of resetting server 2012 r2 admin password with installation disk is to replace Utilman.exe.

  • Boot off Windows disk and select the "Repair your computer" option from the lower left-hand corner.
  • Get to the option to open the Command Prompt.
  • Type the following commands to back up the utilman.exe file:
  • MOVE C:WindowsSystem32Utilman.exe C:WindowsSystem32Utilman.exe.bak
  • Copy cmd.exe and rename it Utilman.exe.
  • COPY C:WindowsSystem32cmd.exe C:WindowsSystem32Utilman.exe
  • Now you can go ahead and reboot your machine. When it's done booting up again and you are at the Logon screen click on the Ease of access icon.
  • Now you have replaced Utilman.exe with cmd.exe.
  • Command Prompt opens, type following commands:
  • .net user administrator *

Once you press Enter, you will be asked to set a new password and then confirm it. When entering new one, don't worry if you can't see it, because it is invisible, however it has been remembered.
Once you're logged in again, don't forget to delete Utilman.exe and then rename Utilman.exe.bak back to plain old Utilman.exe.

Second, reset server 2012 r2 admin password with third-party Windows password genius.
Windows Password Genius has four versions available, standard, professional, and advanced and raid. And the raid version is special, because it works for raid server Windows domain or local admin password reset. The advanced is general version, working on both server and client computers.

So choose appropriate Windows password recovery version to burn a password reset disk and then recover Windows server administrator password.
Preparation: Windows Password Genius Advanced/Raid, available computer and bootable USB drive.

  • Install Windows Password Genius Raid, and run it on available computer.
  • Insert bootable USB drive into this available computer and choose USB, click "Begin burning" to create password reset disk with USB.
  • Exit USB device after it is successfully burned with password reset disk.
  • Plug USB into server 2012 r2 and boot server from USB.
  • Recovery tool program runs, and then choose Windows system - Windows serve 2012 r2, and select user account - administrator.
  • Click "Reset Password", the administrator would be set with new password "[email protected]".

At last, reboot server computer to finish Windows password reset. But remember to exit USB reset disk from server before your server computer boots from hard disk successfully.

Best Windows Server 2012 R2 Hosting Recommendation

ASPHostPortal.com

ASPHostPortal.com provides our customers with Plesk Panel, one of the most popular and stable control panels for Windows hosting, as free. You could also see the latest .NET framework, a crazy amount of functionality as well as Large disk space, bandwidth, MSSQL databases and more. All those give people the convenience to build up a powerful site in Windows server 2008. We offers Windows hosting starts from $5/month only. We also guarantees 30 days money back and guarantee 99.9% uptime. If you need a reliable affordable Windows server 2008 Hosting, we should be your best choice.

 



Windows Hosting - ASPHostPortal.com :: Web Services with ASP.NET

clock July 25, 2016 20:35 by author Armend

Web Services with ASP.NET

A Web Service is programmable application logic accessible via standard Web protocols. One of these Web protocols is the Simple Object Access Protocol (SOAP). SOAP is a W3C submitted note (as of May 2000) that uses standards based technologies (XML for data description and HTTP for transport) to encode and transmit application data.
Consumers of a Web Service do not need to know anything about the platform, object model, or programming language used to implement the service; they only need to understand how to send and receive SOAP messages (HTTP and XML).

 

Soap Message

A SOAP message consists of several elements, most notably an envelope. The envelope encapsulates the data transmitted within the SOAP message. Below is a simple SOAP message complete with HTTP headers:

<?xml version="1.0"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
               xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
               xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
               xmlns:xsd="http://www.w3.org/1999/XMLSchema">
  <soap:Body>
    <PerfCounters xmlns="http://tempuri.org/"/>
  </soap:Body>
</soap:Envelope>

In the example above, we see the HTTP headers for the request, including the HTTP SOAPAction header, which is optionally used by the server for routing the SOAP message. Following the HTTP headers we find the body of the HTTP message. The body of the HTTP message is the SOAP request for a PerfCounters Web Service, which we are going to build.

Best Windows Server 2008 Hosting Recommendation

ASPHostPortal.com

ASPHostPortal.com provides our customers with Plesk Panel, one of the most popular and stable control panels for Windows hosting, as free. You could also see the latest .NET framework, a crazy amount of functionality as well as Large disk space, bandwidth, MSSQL databases and more. All those give people the convenience to build up a powerful site in Windows server 2008. We offers Windows hosting starts from $5/month only. We also guarantees 30 days money back and guarantee 99.9% uptime. If you need a reliable affordable Windows server 2008 Hosting, we should be your best choice.

 



ASP.NET Hosting - ASPHostPortal.com :: How To Configuring your .NET application to use the ASP.NET Session State Store Provider

clock June 27, 2016 19:55 by author Armend

How To Configuring your .NET application to use the ASP.NET Session State Store Provider

In this post I will show you how to configure the ASP.NET session state store provider, you must update the web.config file for the ASP.NET application to include the ASP.NET session state store provider and its configuration.

Before you begin

  • Configure a data grid to store ASP.NET HTTP session state.
  • You must have the catalog server host and port.

Procedure

Update the web.config file of your ASP.NET application with settings for the ASP.NET session state store provider. You must update or add the text in bold in the following example to the web.config file

<system.web>
    …
    <sessionState
        mode="Custom"
        customProvider="WxsSessionStateStoreProvider">
        <providers>
                <add
                     name="WxsSessionStateStoreProvider"
                    type="IBM.WebSphere.Caching.SessionStateStore.WxsSessionStateStore,
                        IBM.WebSphere.Caching, Version=8.6.0.2000, Culture=neutral,
                        PublicKeyToken=b439a24ee43b0816"
                    wxsPropertyFile="\optional\path\to\NET-client.properties"
                    wxsHostAndPort="optionalHostAndPort"
                    wxsGridName="session"
                    wxsMapName="ASPNET.SessionState"
         />          
        </providers>
        </sessionState>
    …
</system.web>

wxsPropertyFile (optional)Specifies the fully qualified properties file that the provider uses when it connects to the data grid with the Connect API. If this attribute is not specified or is an empty string, the provider looks for the Client.Net.properties file in the current runtime directory of the web application process. If the provider does not find the file in the runtime directory, it looks for the Client.Net.properties file in the net_client_home\config directory.wxsHostAndPort (optional)Specifies a comma-separated list of catalog server host and port pairs to which the session state store provider connects when it accesses the data grid. The format follows:

<host name or host ip address>:<tcp port>[,<host name or host ip address>:<tcp port>]

If no value is specified, localhost:2809 is used.

wxsGridName (optional)

Specifies the name of the data grid to which the ASP.NET session store provider connects. If you created a data grid for ASP.NET session states, specify the data grid name that you created. If you do not specify a value, the provider connects to the session data grid.

wxsMapName (optional)

Specifies the map to which the provider connects. If you do not specify a value, the provider connects to the ASPNET.SessionState map.

  • Restart the target web application. The web application must restart so that the provider can be loaded by IIS. In most cases, after the web.config file is modified and current HTTP request processing is complete, the restart occurs automatically.

Results

ASP.NET session state from your ASP.NET application is stored in the data grid.



ASP.NET Hosting - ASPHostPortal.com :: How to Fix ASP.NET Browser Detection Error in Internet Explorer

clock June 20, 2016 20:50 by author Armend

Internet Explorer 11 has a bug which prevents ASP.NET applications from running properly. Your users will view broken layout and JavaScript errors, which occurs due to a bug in the browser detection under .NET Framework 4.

You can easily track down the browser detection problem by using F12 development tool available with Internet Explorer, which modifies the user-agent string sent by the browser. In order to work with the tool, you need to press F12, click the Emulation button located at the bottom left and choosing Internet Explorer 9 from the dropdown list. You will be able to see whether the page renders properly immediately after page refresh.

In order to fix the above issue, you need to install .NET Framework 4.5 on the server, which has built-in solution for this problem. However, if you are running Windows 2003 Server then you will have to install patches provided by Microsoft to update browser detection problem in older versions of .NET Framework. Alternatively, you can directly update the application by opening the App_Browsers folder and adding a .browser file with correct definitions as shown below.

<browsers>
  <browser id="IE11" parentID="Mozilla">
    <identification>
      <userAgent match="Trident/(?'layoutVersion'[7-9]|0*[1-9]\d+)(\.\d+)?;(.*;)?\s*rv:(?'version'(?'major'\d+)(\.

(?'minor'\d+)))" />
      <userAgent nonMatch="IEMobile" />
    </identification>
    <capture>
      <userAgent match="Trident/(?'layoutVersion'\d+)" />
    </capture>
    <capabilities>
      <capability name="browser"              value="IE" />
      <capability name="layoutEngine"         value="Trident" />
      <capability name="layoutEngineVersion"  value="${layoutVersion}" />
      <capability name="extra"                value="${extra}" />
      <capability name="isColor"              value="true" />
      <capability name="letters"              value="${letters}" />
      <capability name="majorversion"         value="${major}" />
      <capability name="minorversion"         value="${minor}" />
      <capability name="screenBitDepth"       value="8" />
      <capability name="type"                 value="IE${major}" />
      <capability name="version"              value="${version}" />
    </capabilities>
  </browser>
 
  <!-- Mozilla/5.0 (Windows NT 6.3; Trident/7.0; rv:11,0) like Gecko -->
  <browser id="IE110" parentID="IE11">
    <identification>
      <capability name="majorversion" match="11" />
    </identification>
 
    <capabilities>
      <capability name="ecmascriptversion"    value="3.0" />
      <capability name="jscriptversion"       value="5.6" />
      <capability name="javascript"           value="true" />
      <capability name="javascriptversion"    value="1.5" />
      <capability name="msdomversion"         value="${majorversion}.${minorversion}" />
      <capability name="w3cdomversion"        value="1.0" />
      <capability name="ExchangeOmaSupported" value="true" />
      <capability name="activexcontrols"      value="true" />

I hope this article helpful for you. happy coding :)

ASPHostPortal.com

ASPHostPortal.com provides quality and reliable ASP.NET 5 hosting services at affordable prices. We are guarantee 99.9% uptime for your site. We have three available payment methods: PayPal, Visa and American Express, so you can pay for their services from all around the world.



Windows Reseller Hosting - ASPHostPortal.com :: Best Practices windows cloud server security

clock April 27, 2016 20:57 by author Armend

More and more we are helping people get set up on  Windows cloud servers here at windows2008hosting.asphostportal.com .  While dedicated server solutions are the right choice for certain situations, clients are finding the benefits of cloud servers or, in many cases, a hybrid hosting solution to be the perfect fit for their hosting needs. With all this cloud talk, there are several technologies supported on Windows cloud servers that you may not have realized. These options can make the difference when configuring a cloud server solution that will best optimize your site or application.

 

Firewalls, VPN & SSL in the Cloud

The best practices of leveraging Virtual Private Networks (VPN), Secure Sockets Layers (SSL) and Firewalls to protect sensitive information on a Windows Cloud Server are recommend and also supported just as they would be with a physical dedicated server. If you’re unsure as to what any of these are and why they are necessary, the following will serve as a summary of each and their benefits.

What is VPN?

Virtual Private Networking is a secure and controlled method of connecting remote networks and users for the purpose of dealing with sensitive information. When using a VPN, all data is encrypted at the source, sent securely to the destination, then decrypted at the destination – assuring that only the previously approved source and destination people or systems can access the data. This is often a necessary element to incorporate in your hosting solution if you are an eCommerce company accessing sensitive back-end data like credit cards or orders, require PCI compliance, or simply need to securely work with remote clients or coworkers regarding sensitive information. A VPN connection allows you to guarantee identity through point-to-point connections and user authentication. While Windows cloud servers are virtual, they retain all the same VPN encrypting capabilities as a dedicated server, giving you complete control over security and privacy of your data. (For more information on Virtual Private Networking.

What is an SSL Connection?

The Secure Socket Layer protocol (SSL) ensures secure transactions between Windows cloud servers and browsers. This is particularly important anytime sensitive information must be transmitted over the open Internet. For example, any sign-up process where personal information is needed, (credit card information, personal data, etc.) would justify use of an SSL connection. You can recognize the use of an SSL connection when you see an “S” included in the URL (https://).
While the technical breakdown of an SSL can be somewhat complicated, it’s important to understand the basic concept of an SSL connection and how important it is inmaintaining security with sensitive information.

What is a Firewall?

A firewall is a security solution designed to only allow safe and trusted connections to whatever it is set to protect. It does this by identifying several pieces of information for all incoming connections, thus blocking access to any unfamiliar or unauthorized sources looking to access that data. The difference between a firewall and an SSL connection is that SSL is used to ensure your sensitive information can be securely sent from a webpage to a server, while a firewall is designed to control direct access to the cloud server itself. A firewall can be used to lock down ports and allow only certain information to be accessible, while keeping other information secure.

Firewall in a Windows Cloud Server

In order to set up a firewall in a Windows cloud server configuration, various steps must be taken to optimize the firewall for the cloud – but depending on your hosting provider, these steps will be covered for you. Once these steps are taken, it is no different than a firewall configured for a dedicated physical server.
Note: In addition to base intrusion detection and firewall protection offered at our network core, our Windows Cloud Servers come with free built-in Windows Firewall service that can be used to lock down ports and restrict access with a focus on the specific needs of your server – assuring that only the ports needed are opened and only available to the users or systems that need the sensitive access.

Cloud Server Security Best Practices

The above security steps are important in and of themselves, but they also serve as a baseline for achieving PCI Compliance, something in which we at ASPHostPortal.com are well versed. So, whether you’re looking to sure up your security as a best practice, or find yourself needing to implement the above steps in accordance with the PCI Security Standard Council, Windows cloud server hosting offers all the tools available on a dedicated server configuration, but often with several added benefits.

Best Windows Server 2008 Hosting Recommendation

ASPHostPortal.com

ASPHostPortal.com provides our customers with Plesk Panel, one of the most popular and stable control panels for Windows hosting, as free. You could also see the latest .NET framework, a crazy amount of functionality as well as Large disk space, bandwidth, MSSQL databases and more. All those give people the convenience to build up a powerful site in Windows server 2008. We offers Windows hosting starts from $5/month only. We also guarantees 30 days money back and guarantee 99.9% uptime. If you need a reliable affordable Windows server 2008 Hosting, we should be your best choice.



ASP.NET Hosting - ASPHostPortal.com :: How to Bind Data to a Label From a SqlDataSource

clock April 25, 2016 21:24 by author Dan

Label controls in ASP.NET don't have a smart tag that allows you to select a data source, so at first glance, it is not easy to see how to bind a value returned from a SqlDataSource or AccessDataSource control to the label. Here's how to programmatically access the data returned by such a DataSource and apply it to a non-databound control.

To programmatically access the contents of a SqlDataSource or AccessDataSource control you need to explicitly call its Select() method. This method accepts a single input parameter of type DataSourceSelectArguments. This parameter can contain information regarding the filters to apply or the column to Order By. For example, when working with a sortable GridView, sorting a column calls the Select() method, and passes in a DataSourceSelectArguments instance with its SortExpression property set to the column name the user chose to sort by. If you don't want the DataSource to sort or filter, you pass in DataSourceSelectArguments.Empty.

Depending on the DataSourceMode of the DataSource control, one of two objects are returned when the Select() method is called. If the DataSourceMode is set to DataReader, a DataReader object is returned. The type of DataReader (SqlDataReader, OleDbDataReader, OdbcDataReader etc) that is returned depends entirely on the provider type used - in other words, whether you are using the OleDb provider, SqlClient provider etc. It has nothing to do with the type of DataSource control. The examples below both query an Access database, but one uses the AccessDataSource control, and the other uses the SqlDataSource control. Both return OleDbDataReaders, because it is the OleDbProvider library that is used for the connection.

If the DataSourceMode is set to Dataset, or not set at all (which means that the default setting of Dataset is used) the object that is returned is a DataView. A DataView is like a DataTable on steroids. It exposes methods that allow you to filter and sort data, for example, and bind it. A DataView contains a collection of DataRowView objects, which represent each row in the returned results.

So, with a DataReader, you would access the values during the DataReader.Read() operation, in very much the same way as if you are using plain ADO.NET code, whereas with the DataSet, you would need to create an object of the appropriate type - DataView, then iterate the DataRowView collection to access the values. In this, the code is remarkably similar to accessing values directly from a DataSet's table collection using plain ADO.NET.

The code below shows the contents of an aspx file, which contains two label controls, and two SqlDataSource controls. Each SqlDataSource control has its DataSource mode set to alternative values - DataSet and DataReader, and both of them have an OnSelecting event defined in which the value of the EmployeeID parameter is assigned:

<asp:Label ID="Label1" runat="server" /> <asp:Label ID="Label2" runat="server" />

<asp:SqlDataSource
    ID="SqlDataSource1"
    runat="server"
    ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
    ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>"
    DatasourceMode="DataSet"
    SelectCommand="SELECT [LastName], [FirstName] FROM [Employees] WHERE ([EmployeeID] = ?)"
    OnSelecting="SqlDataSource1_Selecting">
    <SelectParameters>
        <asp:Parameter Name="EmployeeID" Type="Int32" />
    </SelectParameters>
</asp:SqlDataSource>

<asp:SqlDataSource
    ID="SqlDataSource2"
    runat="server"
    ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
    ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>"
    DatasourceMode="DataReader"
    SelectCommand="SELECT [LastName], [FirstName] FROM [Employees] WHERE ([EmployeeID] = ?)"
    OnSelecting="SqlDataSource2_Selecting">
    <SelectParameters>
        <asp:Parameter Name="EmployeeID" Type="Int32" />
    </SelectParameters>
</asp:SqlDataSource>


The following code snippet shows the aspx.cs file contents, where the parameter values are set in the Selecting event handler. In the Page_Load method, the data returned by each of the Sql DataSource controls is accessed and a value consigned to a label. The method of access depends on the DataSource mode, but is identical for both SqlDataSource and AccessDataSource:

[C#]
protected void Page_Load(object sender, EventArgs e)
{

    DataView dvSql = (DataView)SqlDataSource1.Select(DataSourceSelectArguments.Empty);
    foreach (DataRowView drvSql in dvSql)
    {
        Label1.Text = drvSql["FirstName"].ToString();
    }

    OleDbDataReader rdrSql = (OleDbDataReader)SqlDataSource2.Select(DataSourceSelectArguments.Empty);
    while (rdrSql.Read())
    {
        Label2.Text = rdrSql["LastName"].ToString();

    }
    rdrSql.Close();
}



protected void SqlDataSource1_Selecting(object sender, SqlDataSourceSelectingEventArgs e)
{
    e.Command.Parameters["EmployeeID"].Value = 2;
}

protected void SqlDataSource2_Selecting(object sender, SqlDataSourceSelectingEventArgs e)
{
    e.Command.Parameters["EmployeeID"].Value = 2;
}

[VB]
Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)

Dim dvSql As DataView =
    DirectCast(SqlDataSource1.Select(DataSourceSelectArguments.Empty), DataView)
    For Each drvSql As DataRowView In dvSql
        Label1.Text = drvSql("FirstName").ToString()
    Next

Dim rdrSql As OleDbDataReader =
    DirectCast(SqlDataSource2.Select(DataSourceSelectArguments.Empty), OleDbDataReader)
    While rdrSql.Read()

        Label2.Text = rdrSql("LastName").ToString()
    End While
    rdrSql.Close()
End Sub

Protected Sub SqlDataSource1_Selecting(ByVal sender As Object,
    ByVal e As SqlDataSourceSelectingEventArgs)
    e.Command.Parameters("EmployeeID").Value = 2
End Sub

Protected Sub SqlDataSource2_Selecting(ByVal sender As Object,
    ByVal e As SqlDataSourceSelectingEventArgs)
    e.Command.Parameters("EmployeeID").Value = 2
End Sub


When using this technique with Sql Server - or more specifically the SqlClient provider, change OleDbDataReader to SqlDataReader in the above code. Happy Coding.

Best Windows Shared Hosting Recommendation

ASPHostPortal.com provides our customers with Plesk Panel, one of the most popular and stable control panels for Windows hosting, as free. You could also see the latest .NET framework, a crazy amount of functionality as well as Large disk space, bandwidth, MSSQL databases and more. All those give people the convenience to build up a powerful site in Our Shared Hosting. We offers Windows hosting starts from $5/month only. We also guarantees 30 days money back and guarantee 99.9% uptime. If you need a reliable affordable Windows Shared Hosting, we should be your best choice.



Windows Reseller Hosting - ASPHostPortal.com :: How to Choose Shared Web Hosting Service?

clock April 25, 2016 20:43 by author Armend

How to Choose Shared Web Hosting Service?

Shared web hosting is the most popular hosting solution for launching websites over the Internet. To help you pick a good option, we have introduced the most important aspects that should be considered when choosing web hosting service, including hosting features, customer service, cancellation policy, free marketing credits, and price. These are transparent checkpoints that you can evaluate a web host by yourself easily before signing up.

 

What Is Shared Web Hosting?

In order to have your business more visible for billions of internet users, you need to rent a web server which has fast connection to Internet and allows people to read your information. There are many options for hosting your websites. Usually the reasonable solutions are dedicated server, virtual private server, cloud hosting, and shared web hosting. If you're new to the internet or the estimated daily traffic of the website in the coming year is less than 800 page views or 300 unique visits, the shared web hosting shall be the best choice.

Shared web hosting means that the hosting company sells a dedicated server to thousands of customers. All of these customers share the server resources with each other. Each customer's data and files are protected to be invisible to others hosted with the shared server by some software or technology. Each customer has the complete access to the hosting account and shall be allocated with appropriate system resources.
What Is Shared Web Hosting The shared web hosting provider is responsible for the server maintenance, including both hardware and software.

  • Hardware: upgrade CPU, add memory, replace hard disk, setup backup system such as RAID 0/1/5, network routing and internet connection.
  • Software: upgrade OS or hosting solution software, install security patch, manage firewall, etc.

Meanwhile, as a customer, you have a web based control panel to manage your websites and services. You can view your website uptime or traffic statistics, exception logs, email accounts, and installation of applications. Most of companies don't help you maintain your website as the part of the hosting package unless you pay the additional money which may be more expensive than the hosting service itself.

Why Choose Shared Web Hosting?

Right Expectation on Customer Service For Shared Web Hosting Absolutely, it's the most budget and affordable web hosting solution that can promote your websites over the Internet. Generally, a good shared web hosting works flexibly for websites with less than 800 daily page views.
Another reason is that you don't need to take time maintaining the web server by yourself or hiring IT professionals. The hosting provider takes all of the work. Even some excellent providers perform data backups daily or weekly.

How to Choose Shared Web Hosting?

Pricing & Features

How to Choose Shared Web Hosting The reasonable price of shared web hosting is between $4 and $8 a month. This is the best range that well balances your cost and the web hosting service. It is suspected that some web hosts offer cheap web hosting under $3/month. In that case, it's highly possible that they cut off the customer service or oversell the server.
The best features of a web hosting are the things you require to launch your websites. So what you need to do is to create a list of features on what you need today and tomorrow, and check whether these are included by the hosting plan.

Reliability & Downtime Frequency

Reliability correlates to downtime. The downtime here doesn't mean 5 or 10 minutes down for server maintenance or scheduled operation. As I known, almost all web hosts have been hacked/attacked, down by hardware, or broken by OS/software upgrade. The key is the frequency and how they deal with the problem.
Right Expectation on Customer Service For Shared Web Hosting Basically, have one or twice downtime in a year is reasonable for web hosting in my opinion, not only shared web hosting, but also VPS hosting and dedicated server hosting. The reliability is determined by hardware, software and human maintenance.
As running a computer on hand, no one can guarantee there is no downtime caused by the damage of CPU, memory, motherboard or other hardware. How you can expect a server running for 24/7/365 with high working load without any problems.

Meanwhile, the system holes exist anywhere at all the time, so the hacks and attacks are endless. The FBI site had been hacked before, how you can think the web hosting is 100% secure perfectly.
What's more, most web hosts guarantee more than 99.9% uptime. To be frank, this number is extremely high. As we monitored dozens of web hosts , ASPHostPortal.com is the only host that completely provides such a reliable solution consistently. Read the uptime in the past 30 days below,



About ASPHostPortal.com

We’re a company that works differently to most. Value is what we output and help our customers achieve, not how much money we put in the bank. It’s not because we are altruistic. It’s based on an even simpler principle. "Do good things, and good things will come to you".

Success for us is something that is continually experienced, not something that is reached. For us it is all about the experience – more than the journey. Life is a continual experience. We see the Internet as being an incredible amplifier to the experience of life for all of us. It can help humanity come together to explode in knowledge exploration and discussion. It is continual enlightenment of new ideas, experiences, and passions


Author Link


Corporate Address (Location)

ASPHostPortal
170 W 56th Street, Suite 121
New York, NY 10019
United States

Sign in