Quantcast
Channel: Visual Studio and Visual Web Developer Express
Viewing all 3509 articles
Browse latest View live

aspnet_merge error vs 2010

$
0
0

I am getting the following error when when I try and build and or debug a Visual Studio Solution.  The solution has a deployment project.

aspnet_merge : error occurred: An error occurred when merging assemblies: Unable to cast object of type 'System.Compiler.Module' to type 'System.Compiler.AssemblyNode'.

I can run the last successful build.  I did not change the project since the last successful build.  I just started debugging and got the error.  Thanks for any help.


Performance and Diagnostics Hub - ASP.NET and remote Web sites

$
0
0

Hello:

When I run instrumentation statistics against a local Web application running in VS, I can get client-side and server-side methods and events. If I put a remote URL in, I can only get the IEXPLORE items. Is there a way to include the server (IIS) methods and events remotely using this hub?

Thank you!

VS Express 2008/2013 problem with System.Web.HttpContext.Current.User.Identity.Name.ToString()

$
0
0

I have a web app that was built with VS Express 2008 that works fine.
However, when I open and run the web site with 2013, "System.Web.HttpContext.Current.User.Identity.Name.ToString()" returns an empty string.

I'm guessing that this has something to do with the built-in web server in Visual Studio, but I do not know where I can enable windows authentication.

Default.aspx, code behind, and designer tree structure not correct

$
0
0

Hello, Using VS 2012 and .NET 4.0.

Normally, the tree structure for Default.aspx is like this

Default.aspx
   Default.aspx.designer.vb
   Default.aspx.vb

somehow a project got changed to look like this

Default.aspx
   Default.aspx.vb
      Default.aspx.designer.vb

Also, I am getting a runtime error that it cannot find the designer Class.

How can this be corrected?

Thanks for any ideas

Website publish failing due to file path being too long

$
0
0
<div class="body">

I am trying to publish a Website project from a vendor that has ridiculously long paths to some of its files. When publishing, the error is:

    The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.

When I publish, Visual Studio 2012 Update 3 is attempting to write to a temp directory, and the prefix is quite long:

     C:\Users\cuser\AppData\Local\Temp\WebSitePublish\MidasCMS400v9-1580334405\obj\Debug\Package\PackageTmp\

I thought I might be able to redirect VS to a different temporary directory at `c:\tem` by following this SO answer: http://stackoverflow.com/questions/16526022/temp-path-too-long-when-publishing-a-web-site-project

I create my publication profile, and as soon as I open it, there is an error indicating that `WebPublishMethod` is not an element of `PropertyGroup`. Regardless, I updated the file so it looks like this:

    <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
      <PropertyGroup>
        <WebPublishMethod>FileSystem</WebPublishMethod>
        <LastUsedBuildConfiguration>Debug</LastUsedBuildConfiguration>
        <LastUsedPlatform>Any CPU</LastUsedPlatform>
        <SiteUrlToLaunchAfterPublish />
        <ExcludeApp_Data>False</ExcludeApp_Data>
        <publishUrl>C:\Sites\MidasPublish</publishUrl>
        <DeleteExistingFiles>False</DeleteExistingFiles>
        <AspnetCompileMergeIntermediateOutputPath>c:\tem\</AspnetCompileMergeIntermediateOutputPath>
      </PropertyGroup>
    </Project>

When I try to publish, I get the a modal box pop-up entitled "File Modification Detected", with the message "The project YourWebsite has been modified outside the environment", and it asks me if I want to reload. In my error list, I continue to get the error about the path being too long, as it is not attempting to use the `c:\tem` directory I identified.

I need to put this bloody thing onto a server, I am up for any solution that allows me to publish it. I don't know much about the Website project template, so please let me know if there is a better way.

Thanks!

</div>

Visual Studio 2010 & 2013 Installation

$
0
0

Hello

I have already install visual studio 2010 Can i install two version of visual studio both 2010 & 2013 in one windows?????.when i install visual studio 2013 following error occur

  •   The form specified for the subject is not one supported or known by the specified trust provider.
  • Operation aborted

  •   The form specified for the subject is not one supported or known by the specified trust provider.

Find version VS "VSVersion" = "3:800"?

$
0
0

hi all,

may i know what Visual Studio version(2005 or 2008 or 2010 or 2012 or 2013) support for this "VSVersion" = "3:800"? 

How do we identify VS version with this version number "VSVersion" = "3:800"?

Permission levels for running Visual Studio

$
0
0

Hey folks, I am under the impression that I can perform typical development tasks using a standard user account based on what I understand.  However, I would like to get some confirmation on this assertion.  Can anyone provide me a yes or no answer and a source to confirm this?  Thank you!


ASP.NET One - Select a Template screen empty - VS PRO 2013 Update 3

$
0
0

Greetings

In VSPRO2013.3 when I go to create a new ASP.NET project, the Select a Template screen is blank

I see no options and the add folder/core reference are disabled...

I click Ok and Visual Studio crashes

I have attempted the following:

Reinstall VS templates via nsreinstalltemplates (or something like that)

Reinstalled VS all together... still no luck...

Any ideas? 

FOREACH loop is not looping properly - loop works when debug the code but does not work when execute the code

$
0
0

Dear I have created a function in vb.net and asp.net application in which

  1. from the front end , user selects multiple file names (via checkbox) listed in a page (list.aspx) and clicks export button to see all the documents in one single pdf file
  2. the system grab those documents from database ,
  3. the system converts them in to pdf file format and
  4. the system merge those pdf files into a single pdf file.

From the list.aspx  page when some one clicks export cv it executes this code

window.location.href = 'export-cvs.aspx?v=' + vid + '&a=' + appids.toString();

in the export-cvs.aspx page the following code executes

<object id="cvFrame" width="100%" height="500px" type="application/pdf"  data="preview-bulk-cv.ashx?v=<%= Vacancy.ID%>&a=<%= Request("a") %>"></object>

The Main code is in preview-bulk-cv.ashx  page and it is as below.

Imports System
Imports System.Web
Imports System.IO
Imports System.Collections.Generic
Imports Ionic.Zip
Imports System.Linq
Imports NLog
Imports iTextSharp.text
Imports iTextSharp.text.pdf
Imports System.Text.RegularExpressions


Public Class PDFMerge : Implements IHttpHandler

Public Sub ProcessRequest(ByVal context As HttpContext) Implements IHttpHandler.ProcessRequest
    Dim _logger As Logger = LogManager.GetCurrentClassLogger()
    Dim vacancy = New Vacancy(context.Request("v"))

    Dim sourceFiles = New List(Of String)()


    For Each docPath As String In From row As DataRow In DB.GetData("select guid, originalfilename from document where id in (select candidatecvid from vacancyapplication where id in (" & context.Request("a").ToString() & "))").Rows Let guid = row.Item("guid").ToString() Select HttpContext.Current.Server.MapPath("~/documents") & "\" & Left(guid, 1) & "\" & Right(guid, 1) & "\" & guid & "." & System.IO.Path.GetExtension(row.Item("originalfilename")).ToLower().Substring(1)

        Dim epath As String = HttpContext.Current.Server.MapPath("~/Downloads") & "\" & Now.ToString("yyyy-MMM-dd") & "\" & vacancy.Title.Replace(" ", "_") & "\" & Now.ToString("yyyy-MMM-dd-HHmmss") & ".pdf"

        Converter.ConvertDocument(docPath, epath)

        If File.Exists(epath) Then
            sourceFiles.Add(epath)
        End If


    Next

    Dim OutputFileName As String = HttpContext.Current.Server.MapPath("~/Downloads") & "\" & Now.ToString("yyyy-MMM-dd") & "\" & vacancy.Title.Replace(" ", "_") & "\" & vacancy.Title.Replace(" ", "_") & ".pdf"

    PDFMerge.MergeFiles(OutputFileName, sourceFiles.ToArray)
    Dim mPDFFile As FileStream = File.OpenRead(OutputFileName)
    Dim mPDFFileBuffer(mPDFFile.Length - 1) As Byte
    mPDFFile.Read(mPDFFileBuffer, 0, mPDFFileBuffer.Length)
    mPDFFile.Close()

    System.Diagnostics.Process.Start(OutputFileName)


    context.Response.Clear()
    context.Response.ContentType = "application/pdf"
    context.Response.AddHeader("Content-Disposition", "attachment;filename=" & OutputFileName)

    context.Response.AddHeader("Content-Length", mPDFFileBuffer.Length)
    context.Response.OutputStream.Write(mPDFFileBuffer, 0, mPDFFileBuffer.Length)
    mPDFFileBuffer = Nothing
    context.Response.Flush()
    context.Response.End()



End Sub
End Class  

In the foreach loop the the database query is extracting the documents names and inside the loop the document is converted in to pdf document and added in the the array string.

this loop works perfectly when I add a break point in the process request function and debug the code by reading one statement by one statement.

but when i withdraw the break point and execute the code normally then most of the time the loop just iterates once. (very rarely it works). and when I open the final pdf file i see that it has merged the same file x number of times.(x is the number of file the user has selected )

i.e if the user has selected 3 file names the for each loop reads the first file and converts into pdf. it does not read the next two files and thus do not convert them into pdf files. but the in the merged pdf file the first files appears 3 times.

so somehow the system can see there are 3 documents. but it is taking only the first document and merging it in to the final document 3 times.

Again loop works when debug the code but does not work when simply execute the code.

How can I fix it

IIS Express fails to register URL, access denied

$
0
0

Hello All,

I'm creating a new ASP.NET MVC 5 Application that will use ADFS for authentication.  As a result, I can't use localhost as the hostname in order to the app registered in ADFS.  I'm changed the project URL to my actual host name (iehttps://hostname.domain.com:44300/).  I've adjusted the IIS Express config and csproj files to match.

When I try to build the project I get the error:

"Unable to launch IIS Express Web Server.  Failed to register URL "https://hostname.domain.com:44300/" for site "NewApp" application "/".  Error description: Access is denied"

After some searching, I came about multiple links explaining that i need to run netsh to add an urlacl, which I've done.  My results from "netsh http show urlacl" shows:

Reserved URL : https://hostname.domain.com:43300/
User: \Everyone
Listen: Yes
Delegate: No
SDDL: D:(A;;GX;;;WD)

Reserved URL : https://*:44300/
User: \Everyone
Listen: Yes
Delegate: No
SDDL: D:(A;;GX;;;WD)

So I'm assuming that IIS Express has rights to those ports.

What am I missing?

Error :An asp.net setting has been detected that does not apply in integrated managed pipeline mode. 500.22

$
0
0

We have Installed vs2013 premium edition and we are trying run our application and we getting not able to run the application with vs2013 and IIS 8.

We are able to run the application with vs2012 without any issues. Can anyone please guide on how to resolve the issues as we struggling to fix this issues.

Exact ERror after running the applicationis as below:

HTTP Error 500.22 - Internal Server Error

An ASP.NET setting has been detected that does not apply in Integrated managed pipeline mode.

<system.webServer><validation validateIntegratedModeConfiguration="false"/></system.webServer>

We have this entry in the web.config but still not able to run the application

 

Can't update database during publishing but can update manually via package managment console.

$
0
0

In my Visual Studio 2013 project I am using Entity Framework migrations to take care of database updates. I have my Publish package set to update the database on deploy but when I try to run it I get the error:

Web deployment task failed. (Could not generate deployment script. Internal Error. The database platform service with type Microsoft.Data.Tools.Schema.Sql.Sql120DatabaseSchemaProvider is not valid. You must make sure the service is loaded, or you must provide the full type name of a valid database platform service. Internal Error. The database platform service with type Microsoft.Data.Tools.Schema.Sql.Sql120DatabaseSchemaProvider is not valid. You must make sure the service is loaded, or you must provide the full type name of a valid database platform service.   Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_EXECUTING_METHOD.)

I checked out the link it gives and it just tells me that I am getting a generic error and to check the stack trace but there is no stack trace.

I can force the update to happen if I update my web.config to point to my production DB (ran on the exact same server and my dev DB), open the package manger console, and run the -UPDATE-DATABASE command. This will run the update with no problems at all.

The database was originally created on a Windows Azure DB but that was dropped in favor of a full SQL 2014 server. The project was originally publishing to the Azure DB to test the web.config transformations and publishing ability.

What do I need to correct in order to be able to publish and update the DB at the same time?

Deploy page with report viewer

$
0
0

Hi all,

I have a website using vs2013. My page is using microsoft report viewer 10.

<add assembly="Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
<add assembly="Microsoft.ReportViewer.Common, Version=10.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />

When I run my website using IIExpress the report works fine. But when I publish the website in my IIS it doesn't work, an error occurred in my display processing.

I check my BIN folder and I see the dll's.

Any ideas how to debug this issue?

Thanks in advanced!

The authentication provider returned an error. Please verify your entry and try again. If the problem persists, please contact your system administrator."

$
0
0

The authentication provider returned an error. Please verify your entry and try again. If the problem persists, please contact your system administrator."

how to resolve this error


What am i doing wong in trying to use keyboard shortcuts to publish the existing page I am looking at. I belive it is Alt Alt P

$
0
0

I want to use the keyboard shortcut to publish the existing page I am looking at.  When I use Alt Alt P, I just get the project menu showing. I still have to click the publish page command.

What am I doing wrong?

Can't open VS2003 project

$
0
0

Hi,

I  have a .net 1.1 solution and i am adding existing projects to this solution. There is a project which is giving following error: -

"The project you are trying to open is web project. You need to open it by specifying its URL path."

I have tried adding a webinfo file but that does not work. Please suggest some solution to this.

Thanks.

How is intellisense resolving $.connection ?

$
0
0

Hello,

this is probably more a javascript/jquery question but I was wondering how is VS intellisense resolving "$.connection" to the following js function?

    signalR = function (url, qs, logging) {
        /// <summary>Creates a new SignalR connection for the given url</summary>
        /// <param name="url" type="String">The URL of the long polling endpoint</param>
        /// <param name="qs" type="Object">
        ///     [Optional] Custom querystring parameters to add to the connection URL.
        ///     If an object, every non-function member will be added to the querystring.
        ///     If a string, it's added to the QS as specified.
        /// </param>
        /// <param name="logging" type="Boolean">
        ///     [Optional] A flag indicating whether connection logging is enabled to the browser
        ///     console/log. Defaults to false.
        /// </param>

        return new signalR.fn.init(url, qs, logging);
    };

Thx
Steve

File manipulation using Visual Web Developer

$
0
0
<div class="body">

Please excuse my rookie status but I have recently downloaded Visual Web Developer with a view to creating a specific web page.

I would like to use the space on my Google Sites account to create a web page which does the following:

Have a list of coloured buttons, when the button is pressed, it will update the contents of a text file on my Google Sites account with the name of the colour.

I am proficient in Visual Basic so find it easy to open and close files etc but am lost when it comes to doing this on a web page.  If there is anyone that can help, it would be much appreciated!

</div>

installed but can't create a new website, something's missing

$
0
0

HI chaps, I found visual studio 2012 installed on my machine (yes, literally found it as  it's a corporate machine) and when I attempted to create a new website - the same way I did in visual studio 2008 - I run into a problem. Basically when I go to file -->new --> web site the dialog window has nothing in it, no templates or anything at all. It has a menu on the left (recent, Installed --> templates --> Visual basic and C#) but when I click on c# or visual basic they are empty and I'm thinking that maybe there is something missing but I have no idea what it is.

Now, I am pretty new to asp.net (as I said before I have only used visual studio 2008 previously but only for basic tasks and simple pages), so any suggestions? I had a look online but as I haven't installed it myself it is quite hard to guess what to look for

thanks

Viewing all 3509 articles
Browse latest View live




Latest Images