Quantcast
Channel: Configuration and Deployment
Viewing all 3561 articles
Browse latest View live

cannot read configuration file due to insufficient permissions

$
0
0

hi all

i have one trouble with IIS when i trying open connection. this error "cannot read configuration file due to insufficient permissions" "detail :

filename:\\?\C:\windows\system32\inetsrv\config\redirection.config . error:cannot read configuration file due to insufficient permissions".

if i open config folder, i dont have any access to open it. so tell me how to solve this error ?? but i have permission in my web folder.

thanks

merna


WebServer Error

$
0
0

hi, my web site is online on 2 server now(2008 r2)

but when i try to run it on another server i get this message...

Please help me...


Server Error in '/' Application.


Showing a modal dialog box or form when the application is not running in UserInteractive mode is not a valid operation. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application.

Description:An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.InvalidOperationException: Showing a modal dialog box or form when the application is not running in UserInteractive mode is not a valid operation. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


Stack Trace:

[InvalidOperationException: Showing a modal dialog box or form when the application is not running in UserInteractive mode is not a valid operation. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application.]
   System.Windows.Forms.MessageBox.ShowCore(IWin32Window owner, String text, String caption, MessageBoxButtons buttons, MessageBoxIcon icon, MessageBoxDefaultButton defaultButton, MessageBoxOptions options, Boolean showHelp) +633
   System.Windows.Forms.MessageBox.Show(IWin32Window owner, String text, String caption, MessageBoxButtons buttons, MessageBoxIcon icon, MessageBoxDefaultButton defaultButton, MessageBoxOptions options) +45
   Microsoft.VisualBasic.Interaction.MsgBox(Object Prompt, MsgBoxStyle Buttons, Object Title) +384
   Web_Monitor.StationsStatusGlance.Search() in E:\Web_Monitor\Web_Monitor\Web_Monitor\index.aspx.vb:907
   Web_Monitor.StationsStatusGlance.Page_Load(Object sender, EventArgs e) in E:\Web_Monitor\Web_Monitor\Web_Monitor\index.aspx.vb:97
   System.Web.UI.Control.LoadRecursive() +71
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3048



Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1

Remote Database ConnectionString Error

$
0
0

Hello,

I am using 2 Servers , One Server consiting of windows server 2003 R2 (Operating system ) and Sql Server 2000 as my DataBase (BackEnd). Second one has  Windows Server 2008 R2 (OS) and Sql Server 2008 R2 as DataBase (Backend).

So here, I use first server as Database server and Second Server asApplication Server which are connected in private network 

I setup  TCP/IP 1433 & windows firewall (Inbound Rules) in both servers  ,I created a user in both Sql server 2000 and Sql Server 2008 R2 and i gave all administrator level permissions Which are connected perfectly.

In my application,I have a page Global.asax

i used conncetion string like this 

 Session("strDbConnection") = "Data Source=10.10.76.5;Initial Catalog=MYDataBase;Integrated Security=False;User Id=MY UserID;Password=MYPassword;"

Note: By using this connection string it runs in my local mechine perfectly (Using remote Database) Every thing working

But when i publish this code, remote database is not working?????? 

10.10.46.15 --> is my first server (Database Server)

10.10.46.24 --> is my second server (Application Server)


Suggest me  right Connection string .....

Here is my Web.Config

<?xml version="1.0"?><configuration><connectionStrings><remove name="LocalSqlServer"/><add name="LocalSqlServer" connectionString="Data Source=.\SQLExpress;Integrated Security=True;User Instance=True;AttachDBFilename=|DataDirectory|aspnetdb.mdf"/><add name="Personal" connectionString="server=epfserver;uid=sa;pwd=;database=ebasportal" providerName="System.Data.SqlClient"/><add name="demoConnectionString" connectionString="Data Source=cssds016;Initial Catalog=MYDatabase;User ID=sa" providerName="System.Data.SqlClient"/></connectionStrings><system.web><customErrors mode="RemoteOnly"/><authentication mode="Forms"><forms name=".ASPXFORMSAUTHO" loginUrl="index.aspx" protection="All" path="/" timeout="30000"/></authentication><sessionState timeout="30000"/><httpRuntime executionTimeout="30000"/><authorization><allow users="*"/></authorization><globalization requestEncoding="utf-8" responseEncoding="utf-8"/><roleManager enabled="true"/><compilation debug="true"/><pages/></system.web></configuration>

Entity Framework error: login failed for user 'xyz'

$
0
0

Hi,

I am getting error when I am trying to execute the code to connect using enity framework.

I have also tries setting Persist Security Info =true ,but Still getting error "Login failed for user "userabc"

userabc is SQL user.

Note : It's working perfectly with ADO.net code.

Please help me.

Somnath

crystal report error

$
0
0
I am having error in crystal report load. Error in file unkown.rpt. file could not be submitted for background process . I am using vs2008. It all works on my local machine but coild not run on production server. Please help me I have read most of error solution from different site but not helped me to solve the problem.

connection string not refering in the Machine.config

$
0
0

I have migrated server windows 2003 to windows server 2008.

I have used all the connection string in machine.config only. This will be working in Windows server 2003.

After migrating of the server, Connection string not refering in Machine.config.

 I am getting below error.

Error:

"The connection name 'ConnEmp' was not found in the applications configuration or the connection string is empty."

It will take only web.config only.

But, i want to mention all my connection string in machine.config for security purpose.

what settings i want to do...?

pls. help....

Post Backs are not working in IIS 7.5

$
0
0

We're having some issues with an application migration from .netFx2 on IIS6 into .netFx4.0 on IIS7, application is up, user authentication, db connectivity & navigation are all working, but "NONE" of the pages are processing post backs, despite spending several hours now stripping things out and checking every IIS Setting we can find. I decided to created a basic (very) C# Web (forms) Application, containing only a Single Master Page & Default.aspx, with just a single Button to update a label, but not even that is working in IIS7.

We've already ruled out => http://www.asp.net/whitepapers/aspnet4/breaking-changes as being relevant in this case.

Full Test App Code is below, all IIS6 & 7 Settings are defaults,i.e not customised or altered in any way (Save for enabling .NetFx4 on IIS6)

Master.Master

<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="Master.master.cs" Inherits="TestDummy.Master" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head runat="server"><title></title></head><body><form id="form1" runat="server"><div><div><h1>
                Master Header</h1></div><asp:ContentPlaceHolder ID="MasterBody" runat="server"></asp:ContentPlaceHolder></div></form></body></html>

Master.Master.cs

using System;

namespace TestDummy
{
    public partial class Master : System.Web.UI.MasterPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }
    }
}

Default.aspx

<%@ Page Title="" Language="C#" MasterPageFile="~/Master.Master" AutoEventWireup="true"
    CodeBehind="Default.aspx.cs" Inherits="TestDummy.Default" %><asp:Content ID="PageBody" ContentPlaceHolderID="MasterBody" runat="server"><div><h2>
            Page Header</h2></div><div>
        Stage :-<asp:Label ID="lblLabel" runat="server" Text="First Load"></asp:Label></div><div><asp:Button ID="btnButton" runat="server" Text="Post Back" 
            onclick="btnButton_Click"/></div></asp:Content>

Default.aspx.cs

using System;
using System.Web.UI;

namespace TestDummy
{
    public partial class Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                lblLabel.Text = "First Page Load";
            }
        }

        protected void btnButton_Click(object sender, EventArgs e)
        {
            lblLabel.Text = "Page has posted back!";
        }
    }
}

Web.config

<?xml version="1.0"?><!--
  For more information on how to configure your ASP.NET application, please visit
  http://go.microsoft.com/fwlink/?LinkId=169433
  --><configuration><system.web><compilation debug="true" targetFramework="4.0" /></system.web></configuration>

Postback source from IIS6

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title></title></head><body><form method="post" action="Default.aspx" id="form1"><div class="aspNetHidden"><input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUKMTIyOTk0NzExOQ9kFgJmD2QWAgIDD2QWAgIBD2QWAgIBDw8WAh4EVGV4dAUVUGFnZSBoYXMgcG9zdGVkIGJhY2shZGRknpMx2Ho6Y4B8ugNq3lDniamBZ4IDr2Co1pv9x2r9zn0=" /></div><div class="aspNetHidden"><input type="hidden" name="__EVENTVALIDATION" id="__EVENTVALIDATION" value="/wEWAgLZoM2oBQLNs/TsCdS0FGgnv8TM13t0ZPRA7n1Hvl+AfuyeWchEz4PfYoZ3" /></div><div><div><h1>
                Master Header</h1></div><div><h2>
            Page Header</h2></div><div>
        Stage :-<span id="MasterBody_lblLabel">Page has posted back!</span></div><div><input type="submit" name="ctl00$MasterBody$btnButton" value="Post Back" id="MasterBody_btnButton" /></div></div></form></body></html>

Postback Source from IIS7

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><HTML><HEAD><META content="text/html; charset=windows-1252" http-equiv=Content-Type></HEAD><BODY></BODY></HTML>


We're not exactly experts in IIS7, but have been working with IIS & asp.net for sometime now and are completely complexed as to what could be casuing this.

Any assistance would eb appreciated.

Thanks

ASPx auto encoding syntax does not work on IIS

$
0
0

In my asp.net 4.0 page, inside the ItemTemplate in GridView, I have applied New Expression syntax for Binding Columns like

<%#: Eval(ColumnName) %>

The data is bound successfully in my local machine. After deploying to another server, with Framework 4.0 installed I receive following error

CS1525: Invalid expression term ':'

I discovered that when you install .Net 4.5 framework on the web server the problem is solved.

> Is there any other solution? Since some web servers are incompatible with .Net 4.5 framework the fix i discovered is not a suitable one.


What am i missing with the transformations?

$
0
0

Simple problem folks...  Have a web.config with keys as per:

<add key="salesEmail" value="michael.macneil@elfab.com"/><add key="verificationEmail" value="michael.macneil@elfab.com"/>

When doing a release compile i want to swap them with the transformation in Web.Release.config:

<appSettings><add key="salesEmail" value="salescentral@elfab.com" xdt:Transform="SetAttributes" xdt:Locator="Match(salesEmail)"/><add key="verificationEmail" value="deborah.bevan@elfab.com" xdt:Transform="SetAttributes" xdt:Locator="Match(verificationEmail)"/></appSettings>


However, when building using TFS it just gets ignored.  Have tried using Transform="Replace" but that gets ignored too.  Never successfully done this before so assume it is me not understanding this!

 



 

Tracing in web.config vs @Page

$
0
0

According to http://msdn.microsoft.com/en-us/library/94c55d08(v=vs.100).aspx, it says:

The Trace attribute in the@ Page directive takes precedence over attributes set in the trace element in the Web.config file. Therefore, even if you disable tracing in the Web.config file by setting theenabled attribute to false, the page might still show tracing information if theTrace attribute in its @ Page directive is set totrue.

I find that if I have Trace='true' in the @Page directive of a page and <trace enabled='false' /> in web.config, no tracing takes place.  But if I have <trace enabled='true' /> every page leaves a trace.

How do I have selective Trace in certain pages?

 

Adding files into the setup project - File System View at Build time.

$
0
0

Hi, 

I need to add file into the setup project - File system view -> web application folder at build time.

I'm using Visual studio setup project for creating web setup project(.msi) for deploying my application.

My application has four project that needs to be hosted separately and all the project has some external files which is not directly referred into the project.

For example, I have a *.bat file that needs to be run when the installer installing the files. This I have achieved using custom action. But I need to add this file also in the setup project.

And I've some other external files also needs to be add into the setup project like (Read me..).

I've published the project files into separate folders for the four projects and I copied the files into the setup project manually. I need to automate this process, some one please give me a solution for this.

Used the project output (Primary output and content files), but that is not working for the external files, because I shouldn't add the external files into the project.

If possible, give me a sample. I'm new to setup and deployment project.

How can I format my connection string to work with my Godaddy site?

$
0
0

Hi, I’ve deployed my site to the Godaddy hosting and now I have a huge problem with the formatting of the connection string or so I believe.  I’m using Web Developer 2012 Express.  The connection string on my machine works fine and looks like this:

 

<connectionStrings>

    <add name="ApplicationServices"

        connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|MyDatabase.mdf;User Instance=true"

        providerName="System.Data.SqlClient" />

  </connectionStrings>

 

After I deployed the site I changed the connection to the one provided to me by Godaddy.  Here it is:

 <connectionStrings>

    <add name="ApplicationServices"

Data Source=MyDatabase.db.11111111.hostedresource.com; Initial Catalog=MyDatabase; User ID=MyDatabase; Password='myDatabasePassword';

providerName="System.Data.SqlClient" />

  </connectionStrings>

 

The default page loads but when I click on a tab to navigate to another page it stalls then after a while it loads an error page but no description so I’m at a lost.

 

I’ve tried for days and tried getting help from Godaddy but they can’t help so I thought I would turn to this forum. 

 

Outside of my local environment is there a specific way that I should format my connection string?  Please help me get my connection string going.  Thanks for any help with this one.

 

How to set an initial default web page?

$
0
0

Hi,

I’m trying to set a default start web page for my website (asp.net 2.0 VB), so that when I type my server name and virtual directory in the URL bar (http://myServerName/SiteVirtualDirectoryName) it appears that established initial page (http://myServerName/SiteVirtualDirectoryName/es-ES/initialPage). I use URL Rewriting, so I call my initial page that way ‘initialPage’ and not ‘index.aspx’ (the real file/page name).

Which is the best way to do it? From the point of view of performance and maintenance?
The solution will be the same when I publish my website using a registered Domain Name? (http://www.myRegisteredDomainName.com)

Thanks in advance for your help,

Cesar

Problems with LinkButton generated from code behind

$
0
0

Hey

I have a problem with LinkButtons that I am generating from code behind.

LinkButton lbt = new LinkButton();
lbt.Text = "<table><tr><td style=\"width:268px;\"><h4 style=\"color:Black;margin;\">" + DbHandler.getInstance().getUserName(m.from) +
"</h4><h5 style=\"margin:0;color: Gray\">" + date +
"</h5></td><td><h3 style=\"margin:0;color: Black;\">" + m.subject + "</h3></td></tr></table>";
lbt.CommandArgument = m.id + "|Send|Rediger";
lbt.Command += new CommandEventHandler(lbtMessage_Command);

1. problem

In IE8 it will not fire, in everything else IE9, IE10, Chrome and Firefox there is no problem.

2. problem

There is genereted more the one, and first time you click on it nothing hapens, but then you can click on nomatter witch one and the popup comes, and if you closes the popup and click on an other it comes first time.

Is there any one ho have any suggestions for thes to problems.

Windows Service Access Denied when Configured in IIS

$
0
0

hi,

  I have a website applciation which have one page to start / stop my windows services. I used Impersonation for this. Credentials can be given in web.config and validate thorugh Impersonate class. The code for this class incldue the following methods

public bool impersonateValidUser()
    {
        WindowsIdentity tempWindowsIdentity;
        IntPtr token = IntPtr.Zero;
        IntPtr tokenDuplicate = IntPtr.Zero;

        if (RevertToSelf())
        {
            if (LogonUserA(userName, domain, password, LOGON32_LOGON_INTERACTIVE,
                LOGON32_PROVIDER_DEFAULT, ref token) != 0)
            {
                if (DuplicateToken(token, 2, ref tokenDuplicate) != 0)
                {
                    tempWindowsIdentity = new WindowsIdentity(tokenDuplicate);
                    impersonationContext = tempWindowsIdentity.Impersonate();
                    if (impersonationContext != null)
                    {
                        CloseHandle(token);
                        CloseHandle(tokenDuplicate);
                        return true;
                    }
                }
            }
        }
        if (token != IntPtr.Zero)
            CloseHandle(token);
        if (tokenDuplicate != IntPtr.Zero)
            CloseHandle(tokenDuplicate);
        return false;
    }

    public void undoImpersonation()
    {
        impersonationContext.Undo();
    }

In the service start button i called impersonateValidUser() method. If it returns true i start the service using ServiceController class object

When i run from Visual Studio I can start and stop my windows services thorugh the page.

But when i call the page from IE (configured IIS 7) it returns the following error

"Cannot open XXX service on computer '.'."

where xxx is the windows service name

Kindly guid me to solve this issue. Any permission in IIS level?

 

 


Can't export to file SQL RS in web application

$
0
0

We have an web application that uses reports in SQLRS 2012.

We can access the reports in the webapp using the reportviewer controls the problem is when we try to export we get and (401) Unauthorized error. But when you try to export directly from the SQLRS, it is ok.

We configured the webapp to use impersonate. It is impersonating a domain account.

Could be a temporary folder issue? Can you please help.

 

Thanks,

Chris

is IE the best browser to debug in?

$
0
0

hi,

is it best to debug in IE? It seems the most restrictive so is it the best option to debug? Google chrome seems to allow tons of things through that IE normally throws errors on.

Server Error in '/' Application.

$
0
0

Procedure or function 'spSaveEmp' expects parameter '@EmpId', which was not supplied.

-------------------------------------------------------------------------------------------

Line 42:       {
Line 43:           DBAccess oDBAccess = new DBAccess();Line 44: SqlDataReader rdrEmp = (SqlDataReader)oDBAccess.ExecuteSP(Constants.spSaveEmp); 
Line 45: EmpInfo oEmpInfo = new EmpInfo(); Line 46: while (rdrEmp.Read())

I am getting Error on This. Please tell me how to solve and also tell me the code of a new stored procedure from where i will fetch the data.

SessionStateSection.ElementInformation.IsPresent always returns false

$
0
0

Hi,

I'm reading site's web.config files. I editted web.config file like this:

<system.web><sessionState cookieless="AutoDetect"/>

"IsPresent" always returns false when I try to read the file

 Configuration config = WebConfigurationManager.OpenWebConfiguration("~");
 SessionStateSection sessionState = config.GetSection("system.web/sessionState") as SessionStateSection;

        string a = sessionState.Cookieless.ToString(); //This line returns "AutoDetect"
bool b = sessionState.ElementInformation.IsPresent; // this always returns false as if the section doesn't exist in the file

How can I check if the section exists?

Validatio of viewstate MAC failed. While publishing website in Webserver.

$
0
0

I am developing a website in AS.net and its worked well on web server also. But , this application causes the following error while didn.t browse any functionality in browser after half hour. 


Validation of Viewstate MAC failed. If this application is hosted by a web farm or cluster, ensure that <machinekey> configuaration specifies the same validation kety and validation algorithm. Autogenerated cannot be used in a cluster.

I think its a configuration error?? Help me pls??

Viewing all 3561 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>