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

.net 4.5 framework backward compatibility

$
0
0

Hi 

Currently i have .net framework 4 is installed on the server and got few applications built targeting this framework.

I have a new assignment to build a web api to be deployed to this server. I want to make use of Task, Async Await asynchronous technique provided in .net framework 4.5.

if i install .net framework 4.5 it is a in place upgrade for 4.0  so 4.0 no longer would be available on the server.  But MSDN documentation says  4.5 is backward compatible so application built using 4.0 should work without any changes.

Since this is a production environment i wanted to reach out to the community to hear about your experiences doing this. Can any one please share their thoughts/experiences doing this so i know few tips and cautions before i take on this task.

thanks in advance

ThnqDigital

 


Issue getting network user id - svc-webapps account comes up instead

$
0
0

I have an aspx page that uses some code behind to populate a textbox with the network user id...

            System.Security.Principal.WindowsIdentity a = System.Security.Principal.WindowsIdentity.GetCurrent();

            BoxRecordCreatedBy.Text = a.Name.Split(new char[] { '\\' })[1];

...and in my web config have windows authentication turned on...

    <authentication mode="Windows" />

...but was getting 404 error until I added this to my web.config...

  <appSettings>     <add key="owin:AutomaticAppStartup" value="false"/>   </appSettings>

...so now the page loads and when I run the page in debug my userid populates the textbox as expected but after I publish the page and access it it populates the textbox with a service account...

svc-webapps

Windows authentication is enabled on the IIS server as well.

Could someone kindly show me what I'm doing wrong and how to correct it?

Thanks as tonne, Roscoe

Asp.Net web application on sharepoint 2013

$
0
0

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.

Hide asp.net extension from URL problem

$
0
0

I wanted to hide my asp.net extension in URL. So, I used URL Rewriting and URL Routing to hide it (asax file). When I publish to server (Win 2008), it didn't work but I can run it if I publish to my local wwwroot. What are the settings need to do before publish it? Thanks.

<%@ Application Language="VB" %><%@ Import Namespace="System.Web.Routing" %><script RunAt="server">

    Private Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs)
        RegisterRoutes(RouteTable.Routes)
    End Sub

    Private Shared Sub RegisterRoutes(routes As RouteCollection)
        routes.MapPageRoute("Login", "Login", "~/Login.aspx")
    End Sub
</script>

Issue while publishing site on local IIS server.

$
0
0

Hi All,

Hope you are well.

I am trying to publish a web application on my local IIS but I am getting following error.

HTTP Error 500.19 - Internal Server Error

The requested page cannot be accessed because the related configuration data for the page is invalid.

See image for error message: https://photos.google.com/search/_tra_/photo/AF1QipNDEnUfgduYe0TplHyMc5QA1uHCZiYARNQyx-Ua

My application uses telerik controls. It is working fine when its running through visual studio 2010, but is unable to launch by IIS.

I am getting the same problem with any web application that using telerik control.

I've tried google but still my problem is not resolved I've also checked my IIS installation option and I am opening IIS as administrator.

Can any one have idea about above error.

Any help would much appreciated.

Publishing to a web site

$
0
0

I have recently updated from Windows XP Pro and Visual Studio 2008 to Windows 10 and VS 2015. I have used the same
hosting company for nearly ten years and I never had any problem making web sites this way.

Now, I cannot get my sites to go onto the server and there appears to be technical incompatibility between VS 2015
and how the Server people have set up their system.

To make things simple I took a tempate from VS 2015 : New Project > Visual Basic > ASP.NET Web Application >
Web Forms Template. This is just the "ASP.NET is a free...." template everyone has seen.

I added <customErrors mode="Off" />  Just to be sure there were no bugs I went Project > Build. This was OK. Then I went
Project > Publish and took the FTP option. This was also OK except that I got an error message

"The application attempted to perform an operation not allowed by the security policy.  To grant this
application the required permission please contact your system administrator or change the application's
trust level in the configuration file."

I altered the trust level in the web.config file to Medium according to the instructions in an MSDN document,
but then I got another error message.

"This configuration section cannot be used at this path.  This happens when the site administrator has
locked access to this section using <location allowOverride="false"> from an inherited configuration file."

I referred to the server support team and they said :

"What you're doing locally is fine, the web.config is correct and sets the app to be developed in medium trust,
unfortunately our servers prohibit the changing of this setting and rather than gracefully ignore ASP.net
throws a fatal error about it. The simplest solution to this is to edit your local IIS, or development settings
 to run this in medium trust without having to have the lines in your web.config, otherwise every time you
upload it you will need to remove the lines about medium trust. Do you test this locally be deploying to an IIS
instance?

We do have a few other customers running VS2015 and they've not mentioned this as an issue, I can only
assume they've done one of the above things as if I look at their web.config files they don't have the
lines setting the trust level at all."

Now I'm in limbo. The server team is seemingly at odds with Microsoft. I don't understand what :

"The simplest solution to this is to edit your local IIS, or development settings
 to run this in medium trust without having to have the lines in your web.config"

involves.

Please could someone tell me what to do ?

Configure to restart application pool at midnight

$
0
0

Is it really best practice to restart application pools at midnight? In our application, we restart the applications pools at 2 O' clock in the night. My concerns are:

1. Restarting it every midnight hides application issues that might surface due to continuous usage, hence difficult troubleshooting

2. Web server is scheduled to be restarted i.e. deliberately unavailable for 5 minutes or so.

The argument in favor of it is that .NET would anyways restart application pool when needed so why not restart it in a planned manner.

No ASP object displayed after File System Publishing to IIS

$
0
0
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="EnterTimeKeeper.aspx.vb" Inherits="MTE_4.EnterTimeKeeper" %><!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml"><head runat="server"><title></title></head><body><form id="form1" runat="server">
Please enter your Timekeeper Number and PIN<br /><table><tr><td><asp:Label ID="Label1" runat="server" Text="Timkeeper Number"></asp:Label></td><td> <asp:TextBox ID="txtTK" runat="server"></asp:TextBox> </td></tr><tr><td><asp:Label ID="Label2" runat="server" Text="PIN"></asp:Label></td><td><asp:TextBox ID="TextBox1" runat="server"></asp:TextBox> </td></tr></table><asp:Button ID="Button1" runat="server" Text="Submit" BorderStyle="None" /></form></body></html>

This is happening on a much larger page, but even this simple example will not work.

When published and browsed to, this is what is displayed on the page

<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="EnterTimeKeeper.aspx.vb" Inherits="MTE.EnterTimeKeeper" %> Please enter your Timekeeper Number and PIN

Pertinent Info:

  • ASP 4.0 Framework
  • Server 2012
  • New IIS website port 88
  • ASP and ASPX MIME types have been added
  • New application pool was created
  • published to wwwroot
  • File System publishing method

Please let me know what configuration option in IIS need to be reviewed.

Thank you!


how to publish an app and deploy it using IIS

$
0
0

Hello experts;

So i am learning on how to publish an app. I created the app on my local machine.

1) I created a location on my local machine on the c-drive. 

2) I then went into visual studio to publish the app to that location on my local machine.

3) I then copied all the published contents from that location and saved it into my server location at the same c-drive path.

4) i created a default website on my server using IIS manager.

5) I then downloaded my database onto my server and created exactly the same package and procedure on the database as I had on my local machine.

6) I am finally testing things out by clicking on the Browser *.80 (http) found  on the right-side of iis manager.

question

1) Is this the right way to publish an app

2) How do i make the link public, so that someone else can view the app as well.

Thank you. all help is appreciated.

Configuration Error

$
0
0

Hello My name is wajdi and i'm asp.net developeur. Im building a web application that use MySql database. when i run it on  my local machine eerything work pretty fine but when i deploye it on the remote server i get this error 

Configuration Error

Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately. 

Parser Error Message: Could not load file or assembly 'MySql.Web.v20, Version=6.9.3.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d' or one of its dependencies. The system cannot find the file specified.

Source Error: 

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.


Source File: C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\machine.config    Line: 266 

Assembly Load Trace: The following information can be helpful to determine why the assembly 'MySql.Web.v20, Version=6.9.3.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d' could not be loaded.

Visual Studio restoring staff

$
0
0

Say that i have the following link 

<li><a href='<%= FriendlyUrl.GenerateLink("home") %>'><i class="fa fa-home fa-fw"></i> Home</a></li>

and i change to 

<li><a href='<%= "http://" & Request.Url.Host & "/home") %>'><i class="fa fa-home fa-fw"></i> Home</a></li>

If i try to publish the application i get some errors that FriendlyUrl is not declared. The worst part is that the code is restored so i lose my changes :(

How do i prevent this behavior and get rid of the modified code?

url for my asp.net deployment

$
0
0

Hello expert;

I was finally able to get my asp.net application deployed using IIS. However to be able to navigate to the link. I have to using my server IP in this manner below.

http://198.245.56.778/test

How do I modify the url so that i do not have to use my server ip. I would like this instead

http://intratest/test

Please help

deploying my MVC application on IIS 7

$
0
0

I'm trying to deploy my MVC 5 application on the IIS server in my work.

I created a new web site in the IIS Manager, set the site name and the physical path as well as the port numkber and now I have an IP for the website (the IIS server is an offline server for the company so we access websites by IP)

now when calling this IP from the browser it seems that it is not redirecting to my MVC project it keeps giving me this error:

404 - File or directory not found.

it seems that I'm missing some steps if someone can redirect me.

Note: Is it enough to call the project by IP? or should there be a certain path for it to open. In other words when deploying a VB.net app it redirects to the index.html page directly, but in MVC I don't have a index.html page. It should open the /Home/Index page automatically.

I'm sorry if it is a silly question I'm new to deploying

Thank you in advance

my websitepanel host not showing aspx files

$
0
0

hi.

i just got a windows host with websitepanel panel. i published my website on my pc and uploaded it to wwwroot of my host. i have a html index page. my host just opens this html file and not other aspx pages. i made one htl file on my host and i could show that.

can you thell me what can be the problem nad how to solve it?

link of my website: diplomat-tk.ir

tahnk you for helping

The compiler failed with error code 1 after each updateCompilation Error

$
0
0

Hi,

i am developping an asp.net Web Application, and i am in the stage of deployement and testing

after eah update (wich are frequent), i copy the modified files into the hosting space+ the assembly into the Bin folder i get

Compilation Error : The compiler failed with error code 1.

and it take some time (about 4/5minutes ) to work again

any idea on why it's happenning please ?


Pre-Compile vs. Dynamic Compiling

$
0
0

Until now, I have only PreCompiled my sites.

I have recently started using Umbraco and I see that they do not.

This makes editing my source code so much easier, as I do not need to upload the entire bin folder every time.

1: What are the advantages and disadvantages of this or that?

2: If I use dynamic compiling all of my code is now "openly available" on my site. Is that safe?

Thanks

Web.Config and Transformations.

$
0
0

We have just started to use Octopus and a deployment method.

One of our configuration managers has updated one of the web.config files to use variable substitution: http://docs.octopusdeploy.com/display/OD/Substitute+Variables+in+Files

Should this be completed within the transformation config file?

Thus the substitution should be applied to the web.test.config file, not the web.config file?

Relative URLs when published

$
0
0

I'm adding some error pages to various applications, some web forms and some MVC. When published, these are often sub-domains that have an extra segment added to the URL, so when trying to load my error pages, the css/js files aren't loading. How do I get around this? I could add the extra segment to my URLs for the pages and in the Web.config, but that'd break them for local development. 

urlMappings: Dynamic URL Mapping? possible to get from a database?

$
0
0
I am working on a e-commerce site, using c# and asp.net 2.0.

I would like the client to be able to add or delete items to this online store

Im pretty sure I can figure that part out.... but I would also like them to use "friendly urls" to hopefully reduce the chances of being on the receiving end of a CSS (cross site scripting) hack - and also will be better for search engines and will just look nicer.

I have discovered the <urlMappings> tag that you can put into web.config which can create friendly urls.... but how do I get <urlMappings> to get its information from the database of products?

All I know so far is how to code them in myself, eg:

<urlMappings enabled="true">
<add
url="~/Category.aspx"
mappedUrl="~/Default.aspx?category=default" />
<add
url="~/Autos.aspx"
mappedUrl="~/Default.aspx?category=autos" />
<add
url="~/Games.aspx"
mappedUrl="~/Default.aspx?category=games" />
<add
url="~/Health.aspx"
mappedUrl="~/Default.aspx?category=health" />
<add
url="~/News.aspx"
mappedUrl="~/Default.aspx?category=news" />
</urlMappings>

and that wouldnt be any good for a site that will have products added or removed on the fly.

"Unable to connect to the remote server"

$
0
0

Hi All,

I am trying to send mail through C#, but it shows inner exception "Unable to connect to the remote server".

Below is my code, please help.

 MailMessage msgMail = new MailMessage("xx@xx.xxx", "xx@xxx.xxx");

        msgMail.Subject = "test";
        msgMail.IsBodyHtml = true;
        string bodyText = "<html><body><table width='100%' border='0' cellspacing='5' cellpadding='0' align='center'>  <tr>    <td valign='top'></td>    <td valign='top'></td>    <td valign='top'> </td>  </tr>  <tr>    <td width='31%' valign='top'></td>   <td width='2%' valign='top'><strong></strong></td>    <td width='67%' valign='top'>Thanks for posting jobs/resumes. Please find the link below to register yourself and open your account.</td>  </tr>  <tr>    <td valign='top'></td>    <td valign='top'><strong></strong></td>    <td valign='top'></td>  </tr>  <tr>    <td valign='top'></td>    <td valign='top'><strong></strong></td><td valign='top'>Regards,<br></td>  </tr>    </table></body></html>";
        string strBody = bodyText;
        msgMail.Body = strBody;
        msgMail.Priority = MailPriority.Normal;
        SmtpClient smtp = new SmtpClient();
        smtp.Host = "localhost";
        try
        {
            smtp.Send(msgMail);
            WebMsgBox.Show("Sent");
        }
        catch (Exception ex)
        {
            WebMsgBox.Show(ex.ToString());
        }

Thanks

Viewing all 3561 articles
Browse latest View live


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