Saturday, October 20, 2012

Restored Database/Diagrams Support/SQL-Server 2005


After restoring DB in SQL Server 2005 db most of the time I get the following error:

Database diagram support objects cannot be installed because this database does not have a valid owner. To continue, first use the Files page of the Database Properties dialog box or the ALTER AUTHORIZATION statement to set the database owner to a valid login, then add the database diagram support objects.

Solution

1. Right Click on your database, choose properties
2. Goto the Options Page
3. In the Dropdown at right labeled "Compatibility Level" choose "SQL Server 2005(90)"
4. Goto the Files Page
5. Enter "sa" in the owner textbox.
6. Hit OK

This Work for me but not work move further!!

But for some reason these steps did not work.... After googling for a while I quickly found
the following suggestion which worked just fine for me....

EXEC sp_dbcmptlevel 'yourDB', '90';
go
ALTER AUTHORIZATION ON DATABASE::yourDB TO "yourLogin"
go
use [yourDB]
go
EXECUTE AS USER = N'dbo' REVERT
go

Saturday, August 4, 2012

Entity Framework ,Linq to Sql Issues & Solutions

Error

The type ‘System.Data.Objects.DataClasses.EntityObject’ is defined in an assembly that is not referenced

Solution:.

Entity Framework bug can be resolved by simply add refrence to the solution file.the refence we need to add is  "System.Data.Entity ".Apply by right Click on the solution file


Error

The specified named connection is either not found in the configuration, not intended to be used with the EntityClient provider, or not valid.

Solution

The Above has been found in entity framwork .To reolve this error simply copy your connectionstring from one solution to Main web config File.The error occur when we run multiple projects wihtin a project.The solution enable to read the entity connection properly.this could be resolve by the defined way

Thursday, March 8, 2012

Configure IIS 7.5 Some Issues and Solutions

IIS 7.5 one the Latest Addition of web server consits few of the new Features that make life easier for web developers and provide better security features and enhanced deploys then other iis versions .I am explaining step by step how to configure iss 7.5 for Vs 4.0 Asp.net applications.

Steps to Configure Asp.net Apps On IIS 7.0 and 7.5:.

There are Few things you need to fix early by click on root node of iis.

Anonymous Authentication should enable
Classic.netAppPool must have identity Local
Enable directory Browser if disable
Check on ISAPI and CGI restrictions

Configure Asp.net Compile File to IIS Virtual Directory

1- Create Virtual directory
2- Convert that directory to the Application by right click on it.
3- By Appling all these steps you can configure your Asp 4.0 app to iis 7.5

However Few of the issues has been defined with there solutions.

Issues And Solutions In IIS 7.5 Deployment:.

Error :.

Login Failed For user IISAppPoolClassic.Net Pool

It seems that new IIS version 7.5 runs its Classic .NET AppPool process with a different identity, and from there we get error "Login failed for user 'IIS APPPOOLClassic .NET AppPool'".

Solutions






  • go into Internet Information Services (IIS) Manager



  • expand node with your computer name on left side and select "Application Pools"



  • now in the window on the right side, right click "Classic .NET AppPool" and select "Advanced    Settings..."





  •  find "Identity" property and change its value to "LocalSystem"
     By Appling the Above your Appplication will surely give the response Inshallah......


    Error 2:.

    The page you are requesting cannot be served because of the ISAPI and CGI Restriction list settings on the Web server.The page you are requesting cannot be served because of the ISAPI and CGI Restriction list settings on the Web server.

    Solution

    You will usually get the error ” The page you are requesting cannot be served because of the ISAPI and CGI Restriction list settings on the Web server” on IIS 7.0 if the ISAPI and CGI restriction is set on the webserver . You can solve the problem by disabling this restriction . You can do so by going to IIS manager , click on the hostname of the server , double click Isapi and CGI restrictions , click Edit Feature settings on the top right hand corner and the check the check box Allow unspecified CGI modules and Allow unspecified ISAPI modules .



    Error 3:.

    Server Error in Web Application

    Unsupported Operation. A document processed by the JRC engine cannot be opened in the C++ stack.
    Solution:.

    we will have this error when the reports where not present at source.we need check out the location where we place the publish file.Vs 2010 bydefult not attach the reports with publish file so we need to paste the .rpt files on the particular location where we have publish our application.In this way you can have access of Crystal reports through IIS.
     

    Sunday, December 25, 2011

    Sqlserver Issues ,Security Max Size(2005/2008 sql)

    These are some of the Maximum Capacity Specifications for SQL Server 2008/2005 the Maximum size upto

    * Database size: 524,272 terabytes
    * Databases per instance of SQL Server: 32,767
    * Filegroups per database: 32,767
    * Files per database: 32,767
    * File size (data): 16 terabytes
    * File size (log): 2 terabytes
    * Rows per table: Limited by available storage
    * Tables per database: Limited by number of objects in a database

    DataInsertion From One DataBase Column to Another DataBase Column

    we need to write the following query to Insert Data from One Database column to another database column while the column name must be same in both of the tables and the datatype of the columns.

    "Insert Into ProductDB2.dbo.Items(itm_ItemCode,itm_ItemDesc)
    Select SupplyChaindb.dbo.SI_Item.itm_ItemCode,SupplyChaindb.dbo.SI_Item.itm_ItemDesc from SupplyChaindb.dbo.SI_Item"


    Insert Into ProductDB2.dbo.Items(itm_ItemCode,itm_ItemDesc)Select SupplyChaindb.dbo.SI_Item.itm_ItemCode,SupplyChaindb.dbo.SI_Item.itm_ItemDesc from SupplyChaindb.dbo.SI_Item where SupplyChaindb.dbo.SI_Item.itm_Active='1'

    Debug Sqlserver Stored Procedure:.

    Create the above procedure.

      PROCEDURE Procdebug @in INT, @out INT out BEGINIF ( @in IS NULL ) SET
    @in = 0 WHILE ( @in < = 100 ) BEGIN SET @out = @in SET @in = @in + 10 PRINT CONVERT(VARCHAR, @in) + ' - ' + CONVERT(VARCHAR, @out) END END
    GO
    DECLARE
    EXEC
    SELECT
    @out INT Procdebug 5,@out OUTPUT @out
    After creating stored procedure , select the second script to debug it. After selecting press F11, screen will open sored procedure in debug mode.Keep Press the F11 Button to continue all the cycles of debuging by press the F11 button you will the overall stage values.


    CREATE
    AS

    Saturday, November 19, 2011

    Asp.net from 2.0 ,3.5,4.0 Versions.

    Asp.net from version 1.1 and from the latest version 4.0 changes the technology day by the developers need to be on the twose to be apart of Microsoft Technologist.The Technology used few of the very broad Libraries that reduce the code upto 25%.Few of the technical terms i am going to share with you.

    Tracing:.

    Tracing a term that displays the details about how your code was executed. It refers to collecting information about the application while it is running. Tracing information can help you to troubleshoot an application. It enables you to record information in various log files about the errors that might occur at run time. You can analyze these log files to find the cause of the errors.


    Asp.Net 4.O Issue ConfigurationManager Class Not Access

    The same happened to me... I changed my code accordingly, but the project wouldn't compile. It turns out that you need to add a reference to System.Configuration to the project, rather than simply adding it with a using statement. This can be done as:

    Add a reference to System.Configuration by clicking Project -> Add Reference... and searching through the .NET components for System.Configuration




    Thursday, October 6, 2011

    Asp.Net Codes with Best URLs

    As as the time going we have seen many latest Trends in Dotnet Platform the Latest Visual Studio 2011 has been lanual Studio 2011 has been lanuched with exsiting features for software engineers.The inclusion of MVC 3.0,Linq make the development more impressive .

    Find the Best URLs for your refrence for ASP.NET Codes
    check with exsiting features for software engineers.The inclusion of MVC 3.0,Linq make the development more impressive .

    http://www.aspdotnet-suresh.com/
    http://csharpdotnetfreak.blogspot.com/
    http://asp-net-example.blogspot.com/2008/12/aspnet-arraylist-example-using.html
    http://www.aspnettutorials.com/tutorials/advanced/Hashtable-csharp.aspx
    http://www.xmlforasp.net
    http://aspdotnetcodebook.blogspot.com

    Saturday, July 16, 2011

    Asp,net Inside MVC Architecture

    Inside MVC Architecture

    The entire ASP.NET MVC architecture is based on Microsoft .NET Framework 3.5 and in addition uses LINQ to SQL Server.
     

    What is a Model?

    1. MVC model is basically a C# or VB.NET class
    2. A model is accessible by both controller and view
    3. A model can be used to pass data from Controller to view
    4. A view can use model to display data in page.

    What is a View?

    1. View is an ASPX page without having a code behind file
    2. All page specific HTML generation and formatting can be done inside view
    3. One can use Inline code (server tags ) to develop dynamic pages
    4. A request to view (ASPX page) can be made only from a controller’s action method
    What is a Controller?
    1. Controller is basically a C# or VB.NET class which inherits system.mvc.controller
    2. Controller is a heart of the entire MVC architecture
    3. Inside Controller’s class action methods can be implemented which are responsible for responding to browser OR calling views.
    4. Controller can access and use model class to pass data to views
    5. Controller uses ViewData to pass any data to view    
      Overview:.
    • The user interacts with the user interface in some way (for example, by pressing a mouse button).
    • The controller handles the input event from the user interface, often via a registered handler or callback, and converts the event into an appropriate user action, understandable for the model.
    • The controller notifies the model of the user action, possibly resulting in a change in the model's state. (For example, the controller updates the user's shopping cart.)[4]
    • A view queries the model in order to generate an appropriate user interface (for example the view lists the shopping cart's contents). The view gets its own data from the model. In some implementations, the controller may issue a general instruction to the view to render itself. In others, the view is automatically notified by the model of changes in state (Observer) that require a screen update.
    • The user interface waits for further user interactions, which restarts the control flow cycle.