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

Converting a site from http to https

$
0
0

What happens to many links refering back to my site.

My Site is http://www.mysite.com/blog/blogpost.aspx
When it becomes https the above link, breaks, how does one redirect http links to https

What else do I need when I install a SSL certificate? Do I buy a static IP as well?

What is the check list for such a conversion??
Do search engines require a notification for robots etc


Hosting Site with self signed certification in IIS

$
0
0

Hi Team,  

We was already having an application with hosted with default http protocol. I have created a self signed certificate  and hosted site  with https .  While browsing the site internally through in the server where site is hosted there by hittinghttps://testsiteabc.com in IE the site gets displayed properly.  But While Accesing from outside from the server the its not getting displayed. is that something related Port 443 ? Please let me know how would it be achievable?. 

When downloading a file: System.Runtime.InteropServices.COMException: The handle is invalid. (Exception from HRESULT: 0x80070006 (E_HANDLE))

$
0
0

Hi every body,

I have installed an asp.net2.0 application in IIS7, my application creates files in a shared folder, this files are displayed in a page, you just need to push the desired file's button link for the download to begin, when the file has 0Kb the web browser shows the download windows and you can open or save the file as usually but if the file has something the asp.net application shows the an exception. The event viewer showsTransmitFile failed. File Name: \\\\pru-aplbhui01\\TransportFile\\es21022009.txt, HRESULT: 0x800700a1.

The code that make the transfer is:

Response.AddHeader(

"Content-disposition","attachment; filename="+ filename);Response.ContentType = "text/plain";

Response.TransmitFile(path + filename);

Response.Flush();

Response.End();

NOTE: I have installed Framework 3.5 SP1 and the webapp uses Windows Communication Foundation

The ASP.NET 2.0  Exception is:

The handle is invalid. (Exception from HRESULT: 0x80070006 (E_HANDLE))

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.Runtime.InteropServices.COMException: The handle is invalid. (Exception from HRESULT: 0x80070006 (E_HANDLE))

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:

[COMException (0x80070006): The handle is invalid. (Exception from HRESULT: 0x80070006 (E_HANDLE))]

[HttpException (0x80004005): An error occurred while communicating with the remote host. The error code is 0x80070006.]
   System.Web.Hosting.IIS7WorkerRequest.RaiseCommunicationError(Int32 result, Boolean throwOnDisconnect) +4202784
   System.Web.Hosting.IIS7WorkerRequest.FlushCore(Boolean keepConnected, Int32 numBodyFragments, IntPtr[] bodyFragments, Int32[] bodyFragmentLengths, Int32[] bodyFragmentTypes) +138
   System.Web.Hosting.IIS7WorkerRequest.FlushCachedResponse(Boolean isFinal) +521
   System.Web.HttpResponse.UpdateNativeResponse(Boolean sendHeaders) +1092
   System.Web.HttpRuntime.FinishRequestNotification(IIS7WorkerRequest wr, HttpContext context, RequestNotificationStatus& status) +195

thanks.

Setting CopyLocal property for dependent dlls to false

$
0
0

To optimize performance of visual studio build I've found multiple recommendations to change CopyLocal property for dependent dlls to false,

I've done and it worked perfecty untill I deployed my app on server and I got immediatly server error. Probably some dll missing,

Any idea why on local it works fine but not in run time and how to solve it ?

Access application using DNS

$
0
0

Hi Guys,

Before that we are access application using IP addess now want to access using DNS.

How will do am new in DNS concept.Please help me.

Thanks 

Nandan

Missing dll generates errors

$
0
0

Hi all,

the reason is I'm posting this here is that my problem accurs randomly on our deployed App. For performance reasons, we put CopyLocal to false for some references. After deployement, application worked fine, but from time to time it generates dll missing error for features that worked previously. no change has been done to the application. this error accurs suddenly and randomly.

Any idea why ? your help or thoughts are much appreciated

Why need to recycle application pool?

$
0
0

Infrequently, my two websites become unreachable with a 503 error.

They can be brought back by recycling the application pool (both sites are on the same server at my hosting provider, along with a half zillion other websites).

What kinds of things cause the application pool to need recycling?  Is this strictly a hosting problem, or could my sites themselves cause this (both are very low traffic)?

Thanks for any insight.

Missing dll

$
0
0

Hi all,

the reason is I'm posting this here is that my problem accurs randomly on our deployed App. For performance reasons, we put CopyLocal to false for some references. After deployement, application worked fine, but from time to time it generates dll missing error for features that worked previously. no change has been done to the application. this error accurs suddenly and randomly.

Any idea why ? your help or thoughts are much appreciated


Running Notepad from asp.net using PsExec or WMI

$
0
0

Hello there.

I develpoed an ASP.NET webpage that suppose to open a Notepad program on server pc.

i tried two options but both failed:

First - Using PsExec.exe tool to execute the proccess as myUser (Current logged - Administrator).

            ProcessStartInfo start = new ProcessStartInfo();
            start.WorkingDirectory =@"C:\Windows\System32\";

            start.Arguments = "/k D:\\Downloads\\PSTools\\PsExec.exe \\\\Domain -u Username -p password \"Notepad.exe\"";
            start.FileName = @"cmd.exe";
            start.CreateNoWindow = false;

            int exitCode;


            using (Process proc = Process.Start(start))
            {
                proc.WaitForExit();

                
                // Retrieve the app's exit code
                exitCode = proc.ExitCode;
            }

            

This code doesn't run the process at all and stuck when waiting for the process to exit.

Second - Using WMI :

            string strDomain = "Domain";

            var connOpts = new ConnectionOptions()
            {
                // if i use this i get User credentials cannot be used for local connections‬
                Username = "Username",
                Password = "Password"
            }; 

            ConnectionOptions remoteConnectionOptions = new ConnectionOptions();
            remoteConnectionOptions.Impersonation = ImpersonationLevel.Impersonate;
            remoteConnectionOptions.EnablePrivileges = true;
            remoteConnectionOptions.Authentication = AuthenticationLevel.Packet;
            
            ManagementScope scope = new ManagementScope(@"\\" + Domain + @"\root\CIMV2", remoteConnectionOptions);
            ManagementPath p = new ManagementPath("Win32_Process");

            

            ManagementClass classInstance = new ManagementClass(scope, p, null);


            

            object[] theProcessToRun = { @"Notepad.exe" };

            classInstance.InvokeMethod("Create", theProcessToRun);

This code runs Notepad but as Application pool user.

It is important to say that im using IIS Authentication :( Windows, & Impersonated).

If someone has any idea why i notepad doesn't run.

Thank you for help.

Web Config rewrite rules

$
0
0
<system.webServer><rewrite><rules><rule name="http to https" stopProcessing="true"><match url=".*"/><conditions><add input="{HTTPS}" pattern="off"/></conditions><action type="Redirect" url="https://www.{HTTP_HOST}/{R:0}"/></rule></rules></rewrite></system.webServer>

this works fine  using    http://website.com   or website.com , it is direct to the secure site, but if the user typewww.website.com  it doesn't work, it appendswww.www.website.com.   How do I write this to cover both ways, due to SEO requirements they want everything redirected tohttps://www.website.com

Thanks

RunTime Error

$
0
0

Can someone please help me with an explanation as to how to correct the code for my web.config file to show the error list! I do not know where to place the following code in the web.config file?

Server Error in '/' Application.


Runtime Error

Description:An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.

Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".

<!-- Web.Config Configuration File --><configuration><system.web><customErrors mode="Off"/></system.web></configuration>


Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.

<!-- Web.Config Configuration File --><configuration><system.web><customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/></system.web></configuration>

WEB.CONFIG

<?xml version="1.0" encoding="utf-8"?>
<!--
This file is used by the publish/package process of your Web project. You can customize the behavior of this process
by editing this MSBuild file. In order to learn more about this please visit http://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<WebPublishMethod>MSDeploy</WebPublishMethod>
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
<LastUsedPlatform>Any CPU</LastUsedPlatform>
<SiteUrlToLaunchAfterPublish>http://mvcmuscistorek.azurewebsites.net</SiteUrlToLaunchAfterPublish>
<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
<ExcludeApp_Data>False</ExcludeApp_Data>
<MSDeployServiceURL>mvcmuscistorek.scm.azurewebsites.net:443</MSDeployServiceURL>
<DeployIisAppPath>MvcMusciStoreK</DeployIisAppPath>
<RemoteSitePhysicalPath />
<SkipExtraFilesOnServer>True</SkipExtraFilesOnServer>
<MSDeployPublishMethod>WMSVC</MSDeployPublishMethod>
<EnableMSDeployBackup>True</EnableMSDeployBackup>
<UserName>$MvcMusciStoreK</UserName>
<_SavePWD>True</_SavePWD>
<_DestinationType>AzureWebSite</_DestinationType>
<PublishDatabaseSettings>
<Objects xmlns="">
<ObjectGroup Name="Models_" Order="1" Enabled="False">
<Destination Path="Data Source=(localdb)\v11.0; Initial Catalog=Models_-20150206121022; Integrated Security=True; MultipleActiveResultSets=True; AttachDbFilename=|DataDirectory|Models_-20150206121022.mdf&quot;" />
<Object Type="DbCodeFirst">
<Source Path="DBContext" DbContext="MvcMusciStore_K.MusciStoreEntities__MvcMusciStore_K.Models_, MvcMusciStore_K" Origin="Configuration" />
</Object>
</ObjectGroup>
<ObjectGroup Name="MusicStoreEntities" Order="2" Enabled="False">
<Destination Path="Data Source=(localdb)\v11.0; Initial Catalog=Models_-20150206121022; Integrated Security=True; MultipleActiveResultSets=True; AttachDbFilename=|DataDirectory|Models_-20150206121022.mdf&quot;" />
<Object Type="DbCodeFirst">
<Source Path="DBContext" DbContext="MvcMusciStore_K.Models.MusicStoreEntities, MvcMusciStore_K" Origin="Configuration" />
</Object>
</ObjectGroup>
</Objects>
</PublishDatabaseSettings>
<ADUsesOwinOrOpenIdConnect>False</ADUsesOwinOrOpenIdConnect>
</PropertyGroup>
<ItemGroup>
<MSDeployParameterValue Include="$(DeployParameterPrefix)Models_-Web.config Connection String">
<ParameterValue>Data Source=(localdb)\v11.0; Initial Catalog=Models_-20150206121022; Integrated Security=True; MultipleActiveResultSets=True; AttachDbFilename=|DataDirectory|Models_-20150206121022.mdf"</ParameterValue>
</MSDeployParameterValue>
<MSDeployParameterValue Include="$(DeployParameterPrefix)MusicStoreEntities-Web.config Connection String">
<ParameterValue>Data Source=(localdb)\v11.0; Initial Catalog=Models_-20150206121022; Integrated Security=True; MultipleActiveResultSets=True; AttachDbFilename=|DataDirectory|Models_-20150206121022.mdf"</ParameterValue>
</MSDeployParameterValue>
</ItemGroup>
</Project>

How to Publish and call my asp.net service from a web address www.xxxxxxxx

$
0
0

Hello,
first of all let me say that I  have never deployed any web applications before so my main issue here is inexperience. Hopefully someone with much more experience can help me out.

I have written a WCF Service called "DCRules2". This is hosted in IIS on a windows 2012 server. To consume this Service I have written an ASP.NET Web applications called "DCRulesWeb01" which has a service reference to "DCRules2" and also exists on the same windows 2012 server. In Debug when I  run  "DCRulesWeb01" (Default.aspx) it calls the service and does exactly what I want it to do. "DCRules2" & "DCRulesWeb01"  exist in two separate Project folders. I also have a SQL database (also on same Windows 2012 server)which the service accesses. Now I want to deploy this service so that it can be called from a new website. To achieve this I did the following:

I registered a new domain name www.xxxxxxxx

I published "DCRulesWeb01" using "File system" method to location C:/Users/Administrator/documents/visual%20studio%202015/ Projects/ DCRulesWeb01/DCRulesWeb01/bin

I published "DCRules2" to location C:\Users\Administrator\Documents\Visual Studio 2015\Projects\DCRules2\DCRules2\bin\Release\...

This is where I am currently stuck at !!!!!!

What further steps do I need to take to deploy this service ? How is web application "DCRulesWeb01" linked towww.xxxxxxxx ??? Appreciate any help I can get to get this up and running.

regards
Pat

Attempt by security transparent method 'Microsoft.ScriptManager.MSAjaxv45.PreApplicationStartCode.Start()' to access security critical method 'System.Web.UI.ScriptManager.get_ScriptResourceMapping()' failed.

$
0
0

I have updated an ASP.NET site from 3.5/4.0 to 4.5.2. I am getting the following error when I try to run it. I use GoDaddy for Hosting. Any help would be greatly appreciated. Meanwhile, I am combing through my web.config and Google for additional resources.

Attempt by security transparent method 'Microsoft.ScriptManager.MSAjaxv45.PreApplicationStartCode.Start()' to access security critical method 'System.Web.UI.ScriptManager.get_ScriptResourceMapping()' failed.

Assembly 'System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' is a conditionally APTCA assembly which is not enabled in the current AppDomain.  To enable this assembly to be used by partial trust or security transparent code, please add assembly name 'System.Web.Extensions, PublicKey=0024000004800000940000000602000000240000525341310004000001000100B5FC90E7027F67871E773A8FDE8938C81DD402BA65B9201D60593E96C492651E889CC13F1415EBB53FAC1131AE0BD333C5EE6021672D9718EA31A8AEBD0DA0072F25D87DBA6FC90FFD598ED4DA35E44C398C454307E8E33B8426143DAEC9F596836F97C8F74750E5975C64E2189F45DEF46B2A2B1247ADC3652BF5C308055DA9' to the the PartialTrustVisibleAssemblies list when creating the AppDomain.

[MethodAccessException: Attempt by security transparent method 'Microsoft.ScriptManager.MSAjaxv45.PreApplicationStartCode.Start()' to access security critical method 'System.Web.UI.ScriptManager.get_ScriptResourceMapping()' failed.

Assembly 'System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' is a conditionally APTCA assembly which is not enabled in the current AppDomain.  To enable this assembly to be used by partial trust or security transparent code, please add assembly name 'System.Web.Extensions, PublicKey=0024000004800000940000000602000000240000525341310004000001000100B5FC90E7027F67871E773A8FDE8938C81DD402BA65B9201D60593E96C492651E889CC13F1415EBB53FAC1131AE0BD333C5EE6021672D9718EA31A8AEBD0DA0072F25D87DBA6FC90FFD598ED4DA35E44C398C454307E8E33B8426143DAEC9F596836F97C8F74750E5975C64E2189F45DEF46B2A2B1247ADC3652BF5C308055DA9' to the the PartialTrustVisibleAssemblies list when creating the AppDomain.]
   Microsoft.ScriptManager.MSAjaxv45.PreApplicationStartCode.Start() +19

[InvalidOperationException: The pre-application start initialization method Start on type Microsoft.ScriptManager.MSAjaxv45.PreApplicationStartCode threw an exception with the following error message: Attempt by security transparent method 'Microsoft.ScriptManager.MSAjaxv45.PreApplicationStartCode.Start()' to access security critical method 'System.Web.UI.ScriptManager.get_ScriptResourceMapping()' failed.

Assembly 'System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' is a conditionally APTCA assembly which is not enabled in the current AppDomain.  To enable this assembly to be used by partial trust or security transparent code, please add assembly name 'System.Web.Extensions, PublicKey=0024000004800000940000000602000000240000525341310004000001000100B5FC90E7027F67871E773A8FDE8938C81DD402BA65B9201D60593E96C492651E889CC13F1415EBB53FAC1131AE0BD333C5EE6021672D9718EA31A8AEBD0DA0072F25D87DBA6FC90FFD598ED4DA35E44C398C454307E8E33B8426143DAEC9F596836F97C8F74750E5975C64E2189F45DEF46B2A2B1247ADC3652BF5C308055DA9' to the the PartialTrustVisibleAssemblies list when creating the AppDomain..]
   System.Web.Compilation.BuildManager.InvokePreStartInitMethodsCore(ICollection`1 methods, Func`1 setHostingEnvironmentCultures) +548
   System.Web.Compilation.BuildManager.InvokePreStartInitMethods(ICollection`1 methods) +94
   System.Web.Compilation.BuildManager.CallPreStartInitMethods(String preStartInitListPath, Boolean& isRefAssemblyLoaded) +164
   System.Web.Compilation.BuildManager.ExecutePreAppStart() +108
   System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +597

[HttpException (0x80004005): The pre-application start initialization method Start on type Microsoft.ScriptManager.MSAjaxv45.PreApplicationStartCode threw an exception with the following error message: Attempt by security transparent method 'Microsoft.ScriptManager.MSAjaxv45.PreApplicationStartCode.Start()' to access security critical method 'System.Web.UI.ScriptManager.get_ScriptResourceMapping()' failed.

Assembly 'System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' is a conditionally APTCA assembly which is not enabled in the current AppDomain.  To enable this assembly to be used by partial trust or security transparent code, please add assembly name 'System.Web.Extensions, PublicKey=0024000004800000940000000602000000240000525341310004000001000100B5FC90E7027F67871E773A8FDE8938C81DD402BA65B9201D60593E96C492651E889CC13F1415EBB53FAC1131AE0BD333C5EE6021672D9718EA31A8AEBD0DA0072F25D87DBA6FC90FFD598ED4DA35E44C398C454307E8E33B8426143DAEC9F596836F97C8F74750E5975C64E2189F45DEF46B2A2B1247ADC3652BF5C308055DA9' to the the PartialTrustVisibleAssemblies list when creating the AppDomain..]
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +553
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +95
   System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +190

My web.config file:

<?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><configSections><!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468  --><section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false"/></configSections><appSettings><!-- Encryption Keys --><add key="ASM.ED" value="XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"/></appSettings><connectionStrings><add name="ASMConnectionString" connectionString="XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX;" providerName="System.Data.SqlClient"/><add name="DefaultConnection" connectionString="XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" providerName="System.Data.SqlClient"/><!--<add name="DefaultConnection" connectionString="XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" providerName="System.Data.SqlClient" />--></connectionStrings><!--
    For a description of web.config changes see http://go.microsoft.com/fwlink/?LinkId=235367.

    The following attributes can be set on the <httpRuntime> tag.<system.Web><httpRuntime targetFramework="4.5" /></system.Web>
  --><system.web><trust level="Full" legacyCasModel="true"/><httpRuntime targetFramework="4.5.2"/><customErrors mode="Off"/><authentication mode="None"/><pages enableSessionState="true"><namespaces><add namespace="System.Web.Optimization"/><add namespace="Microsoft.AspNet.Identity"/></namespaces><controls><add assembly="Microsoft.AspNet.Web.Optimization.WebForms" namespace="Microsoft.AspNet.Web.Optimization.WebForms" tagPrefix="webopt"/></controls></pages><membership><providers><!-- ASP.NET Membership is disabled in this template. Please visit the following link http://go.microsoft.com/fwlink/?LinkId=301889 to learn about the ASP.NET Membership support in this template --><clear/></providers></membership><profile><providers><!-- ASP.NET Membership Profile is disabled in this template. Please visit the following link http://go.microsoft.com/fwlink/?LinkId=301889 to learn about the ASP.NET Membership support in this template --><clear/></providers></profile><roleManager><!-- ASP.NET Membership Role is disabled in this template. Please visit the following link http://go.microsoft.com/fwlink/?LinkId=301889 to learn about the ASP.NET Membership support in this template --><providers><clear/></providers></roleManager><!-- If you are deploying to a cloud environment that has multiple web server instances,
            you should change session state mode from "InProc" to "Custom". In addition,
            change the connection string named "DefaultConnection" to connect to an instance
            of SQL Server (including SQL Azure and SQL  Compact) instead of to SQL Server Express. --><sessionState mode="InProc" customProvider="DefaultSessionProvider"><providers><add name="DefaultSessionProvider" type="System.Web.Providers.DefaultSessionStateProvider, System.Web.Providers, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" connectionStringName="DefaultConnection"/></providers></sessionState><compilation debug="true" strict="false" explicit="true" targetFramework="4.5.2"></compilation></system.web><system.webServer><modules><remove name="FormsAuthentication"/></modules><httpErrors errorMode="Detailed"/></system.webServer><runtime><assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="Newtonsoft.Json" culture="neutral" publicKeyToken="30ad4fe6b2a6aeed"/><bindingRedirect oldVersion="0.0.0.0-8.0.0.0" newVersion="8.0.0.0"/></dependentAssembly><dependentAssembly><assemblyIdentity name="WebGrease" culture="neutral" publicKeyToken="31bf3856ad364e35"/><bindingRedirect oldVersion="0.0.0.0-1.6.5135.21930" newVersion="1.6.5135.21930"/></dependentAssembly><dependentAssembly><assemblyIdentity name="EntityFramework" publicKeyToken="b77a5c561934e089"/><bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0"/></dependentAssembly><dependentAssembly><assemblyIdentity name="Microsoft.Owin" culture="neutral" publicKeyToken="31bf3856ad364e35"/><bindingRedirect oldVersion="0.0.0.0-3.0.1.0" newVersion="3.0.1.0"/></dependentAssembly><dependentAssembly><assemblyIdentity name="Microsoft.Owin.Security.OAuth" culture="neutral" publicKeyToken="31bf3856ad364e35"/><bindingRedirect oldVersion="0.0.0.0-3.0.1.0" newVersion="3.0.1.0"/></dependentAssembly><dependentAssembly><assemblyIdentity name="Microsoft.Owin.Security.Cookies" culture="neutral" publicKeyToken="31bf3856ad364e35"/><bindingRedirect oldVersion="0.0.0.0-3.0.1.0" newVersion="3.0.1.0"/></dependentAssembly><dependentAssembly><assemblyIdentity name="Microsoft.Owin.Security" culture="neutral" publicKeyToken="31bf3856ad364e35"/><bindingRedirect oldVersion="0.0.0.0-3.0.1.0" newVersion="3.0.1.0"/></dependentAssembly><dependentAssembly><assemblyIdentity name="Antlr3.Runtime" publicKeyToken="eb42632606e9261f" culture="neutral"/><bindingRedirect oldVersion="0.0.0.0-3.5.0.2" newVersion="3.5.0.2"/></dependentAssembly><dependentAssembly><assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35"/><bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0"/></dependentAssembly><dependentAssembly><assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35"/><bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0"/></dependentAssembly></assemblyBinding></runtime><entityFramework><defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework"><parameters><parameter value="mssqllocaldb"/></parameters></defaultConnectionFactory><providers><provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer"/></providers></entityFramework><system.codedom><compilers><compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:6 /nowarn:1659;1699;1701"/><compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:14 /nowarn:41008 /define:_MYTYPE=\&quot;Web\&quot; /optionInfer+"/></compilers></system.codedom></configuration>


login control without membership provider doesn't work completely after installation

$
0
0

Hi,

I am using login control but without membership provider.

When I enter a correct user name and password, the application works great both locally and on the server. However, in the server, I receive the following error message in my log file (only after deployment and not locally):

Inner Exception Type: System.Web.HttpException
Inner Exception: Unable to connect to SQL Server database.
Inner Source: System.Web
Inner Stack Trace:
at System.Web.Management.SqlServices.GetSqlConnection(String server, String user, String password, Boolean trusted, String connectionString)
at System.Web.Management.SqlServices.SetupApplicationServices(String server, String user, String password, Boolean trusted, String connectionString, String database, String dbFileName, SqlFeatures features, Boolean install)
at System.Web.Management.SqlServices.Install(String database, String dbFileName, String connectionString)
at System.Web.DataAccess.SqlConnectionHelper.CreateMdfFile(String fullFileName, String dataDir, String connectionString)
at System.Web.DataAccess.SqlConnectionHelper.EnsureDBFile(String connectionString)
at System.Web.DataAccess.SqlConnectionHelper.GetConnection(String connectionString, Boolean revertImpersonation)
at System.Web.Security.SqlMembershipProvider.GetPasswordWithFormat(String username, Boolean updateLastLoginActivityDate, Int32& status, String& password, Int32& passwordFormat, String& passwordSalt, Int32& failedPasswordAttemptCount, Int32& failedPasswordAnswerAttemptCount, Boolean& isApproved, DateTime& lastLoginDate, DateTime& lastActivityDate)
at System.Web.Security.SqlMembershipProvider.CheckPassword(String username, String password, Boolean updateLastLoginActivityDate, Boolean failIfNotApproved, String& salt, Int32& passwordFormat)
at System.Web.Security.SqlMembershipProvider.ValidateUser(String username, String password)
at System.Web.UI.WebControls.Login.AuthenticateUsingMembershipProvider(AuthenticateEventArgs e)
at System.Web.UI.WebControls.Login.OnAuthenticate(AuthenticateEventArgs e)
at System.Web.UI.WebControls.Login.AttemptLogin()
at System.Web.UI.WebControls.Login.OnBubbleEvent(Object source, EventArgs e)
at System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args)
at System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e)
at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Exception Type: System.Web.HttpUnhandledException
Exception: Exception of type 'System.Web.HttpUnhandledException' was thrown.
Source: Application_Error - Global.asax
Stack Trace:
at System.Web.UI.Page.HandleError(Exception e)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context)
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at ASP.login_aspx.ProcessRequest(HttpContext context) in c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\qsoft_dms\579ccc0d\cad8298c\App_Web_5joika0h.5.cs:line 0
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

In addition,  that when i try to enter the wrong password after deployment, I am being transferd to a blank page rather than to the same login page with only with an error message. That problem also does not occur localy.

This is part of my code in login page:

protected void Page_Load(object sender, EventArgs e)        {//'Log In' button was clicked                        connstring_def = @"Provider=Microsoft.Jet.OLEDB.4.0; Data source= " + Server.MapPath("~") + @"\file_Gen\SYS_Q0; Jet OLEDB:Database Password = 1234";            string currentUser = null;            string currentGroup = null;            string currentSigName = null;            if (IsPostBack)            {                TextBox username = (TextBox)Login1.FindControl("UserName");                TextBox password = (TextBox)Login1.FindControl("Password");                if (username.Text == superuser&& password.Text == superuserPassword)                {//login if this is the superuser password.                    currentUser = username.Text;                    currentGroup = superuserGroup;                    currentSigName = superuserSig;                }                else                {//check the validity of the username and password (if it exists in the system- check db)                    if (user_exists(username.Text, password.Text))                    {                        currentUser = username.Text;                        currentGroup = getUserGroup(username.Text, password.Text);                        currentSigName = getUserSig(username.Text, password.Text);                    }                }                if (currentUser != null && currentUser != "" && currentGroup != null && currentGroup != "")                {//if the user is authenticated                    Session["User"] = currentUser;                    Session["Group"] = currentGroup;                    Session["SigName"] = currentSigName;                    updateLastLogin(currentUser, password.Text, currentSigName);                    Logic.ApplicLog.AddToLog(currentUser, """""Login");                    FormsAuthentication.RedirectFromLoginPage(username.Text, false);                }            }        }        private void Page_Error(object sender, EventArgs e)        {            // Get last error from the server.            Exception exc = Server.GetLastError();            // Handle specific exception.            if (exc is InvalidOperationException)            {                // Pass the error on to the error page.                Server.Transfer("ErrorPage.aspx?handler=Page_Error%20-%20Default.aspx",                    true);            }            //// Clear the error from the server.            //Server.ClearError();        }

 This is my web.config code:

<?xml version="1.0"?><configuration>  <appSettings/>  <connectionStrings/>  <!--    For a description of web.config changes see http://go.microsoft.com/fwlink/?LinkId=235367.    The following attributes can be set on the <httpRuntime> tag.      <system.Web>        <httpRuntime targetFramework="4.5" />      </system.Web>  -->  <system.web>    <!--             Set compilation debug="true" to insert debugging             symbols into the compiled page. Because this             affects performance, set this value to true only             during development.        -->    <compilation debug="true" targetFramework="4.5">      <assemblies>        <!--<add assembly="System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>-->        <add assembly="System.Web.Abstractions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>        <add assembly="System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>        <add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>        <add assembly="System.Data.Services.Client, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>        <add assembly="System.Data.Services.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>        <add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>        <add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>        <add assembly="System.Web.Extensions.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>        <add assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>      </assemblies>    </compilation>    <!--            The <authentication> section enables configuration             of the security authentication mode used by             ASP.NET to identify an incoming user.         -->    <authentication mode="Forms">      <forms loginUrl="login.aspx" name="MyCustomAuthentication" timeout="15"/>    </authentication>    <!--            The <customErrors> section enables configuration             of what to do if/when an unhandled error occurs             during the execution of a request. Specifically,             it enables developers to configure html error pages             to be displayed in place of a error stack trace.        <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">            <error statusCode="403" redirect="NoAccess.htm" />            <error statusCode="404" redirect="FileNotFound.htm" />        </customErrors>        -->    <authorization>      <deny users="?" />    </authorization>    <sessionState mode="InProc" timeout="15"></sessionState>    <customErrors mode="On" defaultRedirect="ErrorPage.aspx?handler=customErrors%20section%20-%20Web.config">      <error statusCode="404" redirect="ErrorPage.aspx?msg=404&amp;handler=customErrors%20section%20-%20Web.config"/>    </customErrors>        <globalization requestEncoding="windows-1255" responseEncoding="windows-1255" fileEncoding="windows-1255" culture="he-IL" uiCulture="he-IL"/>    <!--<globalization requestEncoding="utf-8" responseEncoding="utf-8" fileEncoding="utf-8" culture="he-IL" uiCulture="he-IL" />-->    <pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID">      <controls>        <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>        <add tagPrefix="ajaxToolkit" assembly="AjaxControlToolkit" namespace="AjaxControlToolkit"/>      </controls>    </pages>  </system.web>  <!--         The system.webServer section is required for running ASP.NET AJAX under Internet        Information Services 7.0.  It is not necessary for previous version of IIS.    -->  <!--allow all users to see the Images folder (for login page)-->  <location path="Images">    <system.web>      <authorization>        <allow users ="*" />      </authorization>    </system.web>  </location>    <runtime>    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">      <dependentAssembly>        <assemblyIdentity name="Microsoft.Data.OData" publicKeyToken="31bf3856ad364e35" culture="neutral"/>        <bindingRedirect oldVersion="0.0.0.0-5.6.3.0" newVersion="5.6.3.0"/>      </dependentAssembly>      <dependentAssembly>        <assemblyIdentity name="HtmlAgilityPack" publicKeyToken="bd319b19eaf3b43a" culture="neutral"/>        <bindingRedirect oldVersion="0.0.0.0-1.4.9.0" newVersion="1.4.9.0"/>      </dependentAssembly>      <dependentAssembly>        <assemblyIdentity name="AjaxMin" publicKeyToken="21ef50ce11b5d80f" culture="neutral"/>        <bindingRedirect oldVersion="0.0.0.0-5.13.5463.15277" newVersion="5.13.5463.15277"/>      </dependentAssembly>    </assemblyBinding>  </runtime></configuration>

SSL certificate install

$
0
0

this is where I am at!

1) I have the SSL certificate, CSR activated to my domain.
2) I am using a DCV method of HTTP

SO what do I do now?

A) Update my webconfig (IIS7) with code to catch http as well as https redirect
B) Load up SSL txt file to WROOT folder (with other files of site).

QUESTION: Is that it ??


Web Application runs fine in Visual Studio but when Published no longer connects to MySQL

$
0
0

I get the following error after publishing my web application to my hosting account.

Authentication to host 'localhost' for user 'BanditsBaseball' using method 'mysql_native_password' failed with message: Reading from the stream has failed.

If I run this on my development machine it connects to the database just fine. Only when I publish do I get this problem.

When I am running in development I connect to calantha.arvixe.com
When I publish I change the Server field for the connection string to localhost like I am supposed to.

Any help in this would be greatly appreciated.


I am basically following this example which is all my code. Again running on my development machine it works fine (connecting remotely) as soon as I publish (connected locally) I get this problem.

http://www.aspsnippets.com/Articles/Use-and-connect-to-MySQL-Database-in-ASPNet-Application-using-MySQLConnector.aspx

Deployment woes

$
0
0

Asp.Net Web API developed in VS 2012.

Deployment is a nightmare.  If I "remove unused references" I can pretty much start over from scratch.

What do I need to install on my server (Win Server 2008 with IIS 7) instead of selecting all references (used or the not) and set copy local to true.  (only thing that work)

deploy asp.net application/website what do we need on the server?

$
0
0

Hello

can someone plz tell me I have asp.net and vb.net application which I need to deploy on server, which I am not sure has got .Net framework on it?

Can we run asp.net applications/websites on a server without .net framework...I am sure they have IIS but don't know which version, does IIs come with .Net framework?

what do we need on the server to deploy an asp.net application/website?

plz urgent help with this

$
0
0

Hello

I have created a test website on asp.net and then clicked,build,publish app and then published it on a c:\ location, then I copied the folder in USB and pasted it on another computer(server), opened IIS add dite and added it but it shows no contents in it, though I can physically see them

Is there any other way I need to deploy this?

can we deploy asp.net application in the form of scripts?

$
0
0

Hello

I am new to .net so asking this question,

I was just wondering that will I be able to deploy my asp.net(with vb.net) application on the server in the form of scripts rather than a dll?

The requirement mentioned in the specification says that .exe and .dll files are not allowed, they have to be non executables like scripts....plz help me find right information

Viewing all 3561 articles
Browse latest View live


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