Two reasons
1. Application Pool for your site is configured for .NET Framework Version = v2.0.XXXXX
.NET 4.
2. .net 4 not installed to your server
Monday, December 3, 2012
Wednesday, November 14, 2012
Clear FileUpload filename
We can do this using javascript. Please refer below code sample
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
<script type="text/javascript">
function clearFileInputField(divId) {
document.getElementById(divId).innerHTML = document.getElementById(tagId).innerHTML;
}
</script>
<asp:Label ID="Label1" runat="server"></asp:Label>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<div id="divFileUp3">
<asp:FileUpload ID="fileUpload1" runat="server" />
</div><asp:Button runat="server" Text="Remove" OnClientClick="clearFileInputField(divFileUp3)"/>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Content>
Wednesday, November 7, 2012
Thursday, November 1, 2012
Saving Changes Is Not Permitted On SQL Server 2008 Management Studio
To allow you to save changes after you
alter table
, do disable prevent changes:- Open Microsoft SQL Server Management Studio 2008
- Click Tools, then click Options
- Click Designers
- Uncheck prevent saving changes that require table re-creation
- Click OK
- Try to alter your
table
Thursday, October 4, 2012
RESTORE cannot process database 'db name' because it is in use by this session.
My issue was I was restoring a database that I also was using as my default database.
So, by changing my user default database to the master db, I was able to restore.
Wednesday, September 19, 2012
The selected stored procedure returns no columns
The reason was, selecting from a temp table and EF can’t figure out the shape of the results at design time.
The solution for this write this line "SET FMTONLY OFF" in begin part of your Stored Procedure but it will not work in selecting data from another database.
Example : Create procedure SPname
The solution for this write this line "SET FMTONLY OFF" in begin part of your Stored Procedure but it will not work in selecting data from another database.
Example : Create procedure SPname
as
SET FMTONLY OFF
Thursday, September 13, 2012
ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
I got this when i trying to read a CSV file and trying to get the data in a
Solution
DataSet
using Microsoft Text Driver in your 64 bit machine.Solution
- Go to IIS and Application Pools in the left menu.
- Click the project name in the listing.
- Click the Set Application Pool Defaults.
- In General Tab, make the Enable 32 Bit Application entry to "
True
"
Monday, September 3, 2012
CheckOut Authentication Failed Nopcommerce
This is due to configuration issues with your shipping method. Please provide valid configuration details.
Learn more Programing Tips and new Features
Thursday, August 30, 2012
ActionLink with Image in ASP.NET MVC 3
<a href="@Url.Action("Index","Home")"><img src="@Url.Content("~/Themes/Gold/images/try-onit.png")" alt="Home" /></a>
Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.
Wednesday, August 22, 2012
An optional parameter must be a reference type, a nullable type, or be declared as an optional parameter
I got this error when i redirect to another action with parameters.
In my case, the problem was parameter name. Add correct parameter.
return RedirectToAction("ProductTryout", new RouteValueDictionary(new { controller = "Catalog", action = "ProductTryout", productId = model.Id }));
In my case, the problem was parameter name. Add correct parameter.
return RedirectToAction("ProductTryout", new RouteValueDictionary(new { controller = "Catalog", action = "ProductTryout", productId = model.Id }));
Monday, August 20, 2012
A generic error occurred in gdi+
You can not save the same bitmap which is being used by other process. So rename it and then try to save
Thursday, August 16, 2012
Wednesday, August 15, 2012
A route named could not be found in the route collection. NopCommerce
Go to the Nop.Web.Infrastructure.RouteProvider.cs
Add following Code
routes.MapLocalizedRoute("YourLink",
"customer/YourLink",
new { controller = "Customer", action = "YourLink" },
new[] { "Nop.Web.Controllers" });
Add following Code
routes.MapLocalizedRoute("YourLink",
"customer/YourLink",
new { controller = "Customer", action = "YourLink" },
new[] { "Nop.Web.Controllers" });
Monday, July 30, 2012
How to Run WAMP Server Parallel with IIS 7 on Windows
When you already have IIS running then you may not be able to run WAMP Server at Localhost. You need to shutdown IIS in order to run WAMP Server properly.
To run WAMP Server parallel with IIS 7, we need to assign port 8080 to WAMP Server so that it runs on http://localhost:8080 and IIS 7 runs on http://localhost
To do this, click on WAMP Server icon on taskbar and go to Apache > httpd.conf
httpd.conf file will be opened. Change ‘Listen 80’ to ‘Listen 8080’ (As shown in the screenshot). Save and restart WAMP.
Now you can access WAMP Server access on http://localhost:8080
And at http://localhost IIS 7 will be running.
To run WAMP Server parallel with IIS 7, we need to assign port 8080 to WAMP Server so that it runs on http://localhost:8080 and IIS 7 runs on http://localhost
To do this, click on WAMP Server icon on taskbar and go to Apache > httpd.conf
httpd.conf file will be opened. Change ‘Listen 80’ to ‘Listen 8080’ (As shown in the screenshot). Save and restart WAMP.
Now you can access WAMP Server access on http://localhost:8080
And at http://localhost IIS 7 will be running.
Thursday, July 26, 2012
Free shipping over X Nop Commerce
I you had a problem with Free shipping over X, i would recommend that you check to be sure
1) you don't have any discounts set up (Category, Role, etc.),
2) your product item has
a) Is Shippable - checked
b) Free Shipping - not checked
b) No per item additional shipping charges
Learn More new features and programing Tips from
Thanks
1) you don't have any discounts set up (Category, Role, etc.),
2) your product item has
a) Is Shippable - checked
b) Free Shipping - not checked
b) No per item additional shipping charges
Learn More new features and programing Tips from
Thanks
Wednesday, July 25, 2012
Installing DotNetNuke using SQL Server 2005/2008 as your database server
1.Download the latest stable release of DotNetNuke, using the INSTALL package
2.Extract the contents of the ZIP package to a folder on your computer.
3.Create a directory in the c:\inetpub\wwwroot\ folder called DotNetNuke which would look like c:\inetpub\wwwroot\dotnetnuke\
4.Copy the contents of the extracted DNN INSTALL package to the c:\inetpub\wwwroot\dotnetnuke\ folder
5.Go to the properties of the c:\inetpub\wwwroot\dotnetnuke\ folder, click on the Security tab, be sure to add the permissions for the appropriate user (WinXp/2000 uses the local ASPNET account, Win2003/Vista/2008/7 use the local Network Service account). Give this account modify permissions on the folder
6.Open up the the web server IIS Console, start->run->INETMGR
7.Expand the websites node
8.Expand the default website node
9.Right click on the dotnetnuke folder under the default website, click on Convert to Application, if you don't have that option, choose properties and then add the application.
10.Open up SQL Management Studio (2005/2008), or Enterprise Manager (2000)
11.Connect to your database server (might be local)
12.Expand the server node (name of the SQL server/computer) and right click on the Databases node, choose New Database.
13.Define the database name and other properties, click OK to create the database.
14.Configure the SQL User Security/Account
15.Browse to your website using http://localhost/dotnetnuke
16.Step through the installation wizard, use Typical or Custom.
17.When you get to the database screen you need to choose SQL 2000/2005/2008 (not the SQL Express option)
2.Extract the contents of the ZIP package to a folder on your computer.
3.Create a directory in the c:\inetpub\wwwroot\ folder called DotNetNuke which would look like c:\inetpub\wwwroot\dotnetnuke\
4.Copy the contents of the extracted DNN INSTALL package to the c:\inetpub\wwwroot\dotnetnuke\ folder
5.Go to the properties of the c:\inetpub\wwwroot\dotnetnuke\ folder, click on the Security tab, be sure to add the permissions for the appropriate user (WinXp/2000 uses the local ASPNET account, Win2003/Vista/2008/7 use the local Network Service account). Give this account modify permissions on the folder
6.Open up the the web server IIS Console, start->run->INETMGR
7.Expand the websites node
8.Expand the default website node
9.Right click on the dotnetnuke folder under the default website, click on Convert to Application, if you don't have that option, choose properties and then add the application.
10.Open up SQL Management Studio (2005/2008), or Enterprise Manager (2000)
11.Connect to your database server (might be local)
12.Expand the server node (name of the SQL server/computer) and right click on the Databases node, choose New Database.
13.Define the database name and other properties, click OK to create the database.
14.Configure the SQL User Security/Account
- SQL User Security (requires mixed mode authentication to be enabled in SQL Server)
- Right click on Server/Security and choose New Login
- Define new SQL Server authentication login information, username/password.
- From the User Mapping section choose the new DNN database and configure the db_owner role membership. Click OK
15.Browse to your website using http://localhost/dotnetnuke
16.Step through the installation wizard, use Typical or Custom.
17.When you get to the database screen you need to choose SQL 2000/2005/2008 (not the SQL Express option)
- If you have only one instance of SQL running on your server, and you intend on using the SQL instance on your machine, you can enter a '.' for the database location or use (local) as the local instance name (the brackets are necessary(. Otherwise, if you have more than one instance of SQL running on your localhost (SQL2005, SQL2008Express, SQL2008) and you are going to use one of the local instances enter a period followed by a slash and the instance name. For example '.\SQL2008'
- Integrated Security (no changes)
- Not using Integrated Security
- Uncheck Integrated Security
- Type in the Username and Password from steps 14-b-ii-iii
19.Test the database connection, if successful continue
20.Step through the remainder of the installation wizard configuring the Host and Admin accounts.
Tuesday, July 24, 2012
Monday, July 16, 2012
Friday, July 13, 2012
Hide menu items by customer role NopCommerce 2.4
Admin>Configuration>Settings>General and miscellaneous settings>Security settings tab enable
Hide admin menu items based on permissions.
Thanks
Hide admin menu items based on permissions.
Learn more Programing Tips and new Features
Thanks
Friday, June 29, 2012
Thursday, June 14, 2012
Wednesday, June 13, 2012
How to add new tables to NOPCommerce
I spent plenty of time for delving into this problem' depths. I can summarize the solution as follows:
1. Create The Entity Class (e.g Entity.cs)
Path : Nop/Core/Domain/Entity.cs
2. Create The Mapping Class (e.g EntityMap.cs)
Path : Nop/Data/Mapping/EntityMap.cs
3. Create a Model for MVC (e.g EntityModel.cs)
Path : Nop/Admin/Models/EntityModel.cs OR Nop/Web/Models/EntityModel.cs
4. Create a validator for model (e.g EntityValidator.cs)
Path : Nop/Admin/Validators/EntityValidator.cs OR Nop/Web/Validators/EntityValidator.cs
5. Create A Mapping Configuration On AutoMapperStartupTask.cs for Entity and Model
Path : Nop/Admin/Infrastructure OR Nop/Web/Infrastructure
6. Apply Mapping between Model and Entity on MappingExtensions.cs
Path : Nop/Admin OR Nop/Web
7. Create a service class and service interface (e.g EntityService.cs , IEntityService.cs)
Path : Nop/Services/EntityService.cs AND Nop/Services/IEntityService.cs
8. Update DependencyRegistrar.cs
9. Finally Create Controller and View for given model
1. Create The Entity Class (e.g Entity.cs)
Path : Nop/Core/Domain/Entity.cs
2. Create The Mapping Class (e.g EntityMap.cs)
Path : Nop/Data/Mapping/EntityMap.cs
3. Create a Model for MVC (e.g EntityModel.cs)
Path : Nop/Admin/Models/EntityModel.cs OR Nop/Web/Models/EntityModel.cs
4. Create a validator for model (e.g EntityValidator.cs)
Path : Nop/Admin/Validators/EntityValidator.cs OR Nop/Web/Validators/EntityValidator.cs
5. Create A Mapping Configuration On AutoMapperStartupTask.cs for Entity and Model
Path : Nop/Admin/Infrastructure OR Nop/Web/Infrastructure
6. Apply Mapping between Model and Entity on MappingExtensions.cs
Path : Nop/Admin OR Nop/Web
7. Create a service class and service interface (e.g EntityService.cs , IEntityService.cs)
Path : Nop/Services/EntityService.cs AND Nop/Services/IEntityService.cs
8. Update DependencyRegistrar.cs
9. Finally Create Controller and View for given model
Thursday, May 24, 2012
Cannot implicitly convert type 'int?' to 'int'. An explicit conversion exists (are you missing a cast?)
I got this when i use linq query
query is below
public IQueryable<GasUtilGas> LoadAllForkliftGasUtilByDetailId(int id)
{
var res = from gu in db.tblForlkliftGasUtils
join g in db.tblGas on gu.GasID equals g.GasID
select new GasUtilGas { GasNo = g.GasNumber};
return res;
}
It seems like g.GasNumber is a nullable int field in the database. Change the model to this:
public class GasUtilGas
{
public int? GasNo { get; set; }
}
query is below
public IQueryable<GasUtilGas> LoadAllForkliftGasUtilByDetailId(int id)
{
var res = from gu in db.tblForlkliftGasUtils
join g in db.tblGas on gu.GasID equals g.GasID
select new GasUtilGas { GasNo = g.GasNumber};
return res;
}
It seems like g.GasNumber is a nullable int field in the database. Change the model to this:
public class GasUtilGas
{
public int? GasNo { get; set; }
}
Friday, May 11, 2012
The data source does not support server-side data paging
You can't use an IQueryable object to data bind to a GridView and still use Paging and Sorting. You must return a List to the GridView using the ToList() method.
Thanks
Sunday, May 6, 2012
Monday, April 23, 2012
no parameterless constructor defined for this object - nopcommerce 2.4
Register your service classes in Nop.Web.Framework.DependencyRegistrar.
Thanks
Thanks
Monday, February 20, 2012
Image upload with CKEditor.
Image upload with CKEditor.
My latest issue was how to integrate CKFinder for image upload in CKEditor. Here the solution.
1. Download CKEditor and extract in your web folder root.
2. Download CKFinder and extract withing ckeditor folder.
3. Then add references to the CKEditor, CKFinder and put
<CKEditor:CKEditorControl ID="CKEditorControl1" runat="server"></CKEditor:CKEditorControl>
to your aspx page.
4. In code behind page OnLoad event add this code snippet
protected override void OnLoad(EventArgs e)
{
CKFinder.FileBrowser _FileBrowser = new CKFinder.FileBrowser();
_FileBrowser.BasePath = "ckeditor/ckfinder/";
_FileBrowser.SetupCKEditor(CKEditorControl1);
}
5. Edit Confic.ascx file.
public override bool CheckAuthentication()
{
return true;
}
// Perform additional checks for image files.
SecureImageUploads = true;
Thanks
My latest issue was how to integrate CKFinder for image upload in CKEditor. Here the solution.
1. Download CKEditor and extract in your web folder root.
2. Download CKFinder and extract withing ckeditor folder.
3. Then add references to the CKEditor, CKFinder and put
<CKEditor:CKEditorControl ID="CKEditorControl1" runat="server"></CKEditor:CKEditorControl>
to your aspx page.
4. In code behind page OnLoad event add this code snippet
protected override void OnLoad(EventArgs e)
{
CKFinder.FileBrowser _FileBrowser = new CKFinder.FileBrowser();
_FileBrowser.BasePath = "ckeditor/ckfinder/";
_FileBrowser.SetupCKEditor(CKEditorControl1);
}
5. Edit Confic.ascx file.
public override bool CheckAuthentication()
{
return true;
}
// Perform additional checks for image files.
SecureImageUploads = true;
Thanks
Tuesday, February 14, 2012
ASP.NET 4.0 potentially dangerous Request.Form value was detected
put <pages validateRequest="false" />
Subscribe to:
Posts (Atom)
TinyMCE Insert/Edit link not editable
To fix this add e.stopImmediatePropagation() as below. $(document).on('focusin', function (e) { if ($(e.target).close...
-
I spent plenty of time for delving into this problem' depths. I can summarize the solution as follows: 1. Create The Entity Class (e.g...
-
Image upload with CKEditor. My latest issue was how to integrate CKFinder for image upload in CKEditor. Here the solution. 1. Download C...
-
Introduction: In my MonoGame Android project, I wanted to provide users with the option to rate my app when they clicked a button within the...