Padlock icons in MVC project - c#

my project was working good, someone asked me to upload it to GitHub, I did it and after downloaded it again, now when I open my project all of the files contained in it have a padlock icon besides and when I debug my project it produces an exception, why it this happening? Maybe it has to do with Team Foundation Server? How could I make my project work normally as it was before?

It seems like it was a problem of configuration, it was weird because it didn't recognized even Entity Framework, I changed to an administrator local account for windows and in the SQLServer service, right click, select Properties, Log On tab, and changed "Logon as" to "This account" with the new local account, that solved the issue

Related

Virtual Directory Not Created - Azure Bot

I am developing a bot in Azure using the Bot Framework (C#). After spinning it up on Azure I downloaded the source code and tried to open the provided Visual Studio solution file but got an error
Creation of virtual directory http://localhost:3894/ failed with the error: Filename: redirection.config Error cannot read configuration file
Google points towards an issue with IIS or IISExpress but the recommended solutions (forcing IIS to recreate config files by renaming them) didn't work. I don't know if the issue is with Visual Studio, my system, or something else entirely but anything that could shine light on the situation would be appreciated.
EDIT: Deleted and Re-downloaded both VS and IISExpress, did not fix the problem
Try to right click your project in solution explorer and select properties. The select web on the left side. click the create virtual directory button. see if that works for you.

Setup.exe not working or slow to open install dialog for a ClickOnce application

I am trying to use ClickOnce to automatically update a C# software.
I can publish my application, the setup.exe is created, but when I download/run it, windows tells me that application can be dangerous, the publisher cannot be verified. And if I choose to run it anyway, or as administrator, the install dialog sometimes appear after 10 min but in general nothing happen.
I tried to find a way to make my application trustful but even if :
I enable ClickOnce security settings
Select "This is a full trust application" in "Security"
Add a certificate in "Signing"
It is still not working, so I have no more idea about how to fix this.
I can install it with the ".application" file but I think that is not the correct way to do it.
Thanks by advance !
You are pretty close. Much of the slowness is probably because of anti-virus. Signing it will make things better. The client machines will complain about how trustworthy the app is, unless you install your key (the one used for signing) on each of their machines.
Installing with the ".application" is just fine, especially if you are installing from a network share (instead of a web site or intranet site). That should put an app (icon) in the users' start menu.

VS 2013 hangs when publishing website to Azure cloud service

I have a website in C# Visual Studio 2013, which was developed by another developer and is hosted on Azure cloud service. Whenever I make any changes and try to publish, Visual Studio hangs and I can't publish it. It is not showing any error message. Besides that I can successfully deploy it by building it, but as it's taking too much time and also costs money to client (as VS Team Services only provides monthly 60 minutes of free build, after that clients get charged for extra minutes). I am using following steps for publishing and it's works fine but after publishing starts Visual Studio hangs and is unresponsive.
The steps to publish the website are as follows:
1) Open the solution in visual studio.
2) Right click on the azure project in the solution explorer, and select publish.
3) The first step in the wizard is to sign in, make sure to select your credentials.
4) The next step is settings, make sure environment is set to production and build configuration is set to release, then click next.
5) The final step is a summary, simply click the publish button.
I am very new to Azure so let me know if I need to make any setting during set up my project.
I hit the same problem after installing the 2.8 SDK and tools. After checking out these answers I still had the problem, but found a solution.
Right click the Azure project in the VS2013 solution explorer, open project properties. Go to the application tab, and there's an "Upgrade" button to upgrade the project to the latest SDK. That did the trick for me.
It sounds like you are doing the right steps to deploy using the wizard. However I don't have enough information to know what would cause this to hang. There are some documentation details about the wizard that might help? https://msdn.microsoft.com/en-us/library/azure/hh535756.aspx
There are other ways to deploy to Azure, which may solve the issue. You can for example download a publish settings profile, and use this to deploy instead of the wizard. Details here: http://blogs.msdn.com/b/avkashchauhan/archive/2012/05/10/downloading-windows-azure-publish-settings-subscription-configuration-file.aspx
Or you can deploy continuously from Git - https://azure.microsoft.com/en-us/documentation/articles/web-sites-publish-source-control/#Step75
Both solutions will require some tinkering in the Azure portal or getting in with PowerShell but there's a lot of ways to deploy.
Doing these two things fixed it for me, not sure which:
Clean build
Server Explorer > (Had to re-enter Azure credentials)
VS2013 update 5.
A related post found here..
https://social.technet.microsoft.com/Forums/virtualization/en-US/4e51b1f0-91c3-4ce9-9a15-a8d10f912c5b/publish-cloud-service-causes-visual-studio-2013-to-hang-crash?forum=windowsazuredevelopment
One user was able to get past the publish freezing by doing the following..
So I did a line-by-line comparison between all of the files in that
new project and everything in my existing one and found only two
possible things wrong:
1) The version stamps (dates, really) in my
files were not upgraded to reflect the latest version of the Azure
tools. I manually changed those in my existing project to match the
garbage test project's date stamps.
2) My XML files had some empty
sections that did not exist in the new project's files, so I simply
removed those empty sections.
3) Beyond that, I also deleted my *.user
file.
Specifically, I was able to remove schemaVersion="2014-06.2.4" from my ServiceConfiguration and ServiceDefinition files and it fixed the issue.
My guess is that your installed sdk version is different than the specified schemaversion.
I tried all above methods none worked for me. So this is for people who already tried above and still couldn't make it work.
=> Publish in Release mode :-)
Yes I was trying to publish in Debug mode which was causing it to hang till death ;-)

Problems with ClickOnce deployment (to me, it's so annoying)?

I've just tried ClickOnce for the first time to deploy my SQL Server Compact application. I think this kind of deployment is very unprofessional:
The output setup is a folder including 3 objects, one folder named Application Files, a setup.exe and a .application file which I've never seen in a professional product setup package.
Plus, clicking setup.exe seems to help user install the application so quickly but user has no chance to select what location s/he wants to install the application. It's installed by default at somewhere in the target computer. And even I tried looking for its location after the installation, I couldn't find it.
The last, after the installation, there is a folder named "Microsoft" in All programs menu, and the installed application shortcut is located in there. I wonder why it is always Microsoft? I even tried editing my Company info in Assembly info through Project Properties window. The application shortcut is something strange when I can't find its target executable file in its properties window.
With all the above ClickOnce can bring to me, I consider it as a funny job for testing the application only not for publishing a commercial application.
Could you please correct me if there is any wrong in #1, #2, #3 and please give me a better solution for deployment, I'm interested in SQL server (service-based and file-based) application only?
Your help would be highly appreciated. Thanks.
A ClickOnce install is a per user "sandboxed" install, not a normal install you think about when installing normal applications. The .application file is used by the server as a manifest and to determine if it needs to update the install when clicked.
The reason you can't find setup.exe is because it isn't there. Once the files are installed, it isn't kept. The user isn't supposed to know where the files are, the system manages the location and updating of the app.
So, with all that, it appears you need a more normal install, not a ClickOnce. ClickOnce isn't intended to install services or other per machine files.

visual studio application deploy

I'm trying to create an installer for my application (win form) by visual studio, creating a new project type setup, and am having great difficulty in doing so, for example:
1 When I create the installer and run it installs, but there is the option to uninstall? and I can not install the same application because it already exists on the machine.
2 In dialog window, I see you have the options to create multiple screens and add textbox for example, but where do I set the events of that textbox?
3 º This application works with sqlserver, and I can install it on the machine by the installer, but as I set him to work with my application linq, since I would have to modify the connection string on each machine that I will install the application.
I've researched a lot about these issues and I find no documentation that can teach me how to do this, if anyone knows some please show me,
I appreciate those who can help me, and sorry my english.
I answer your first question at this time due to the lack of time:
In VS, right click the setup project. You have 2 options: Install and Uninstall.
1.) You need to uninstall the program through your operating system. Go to the Control Panel, Programs and uninstall it. Then you can try installing the application.
2.) In design view you can double click the textbox. You will be taken to the method that handles the “TextChanged” event. Write your code there.
3.) If you are installing on a server you need to create a Web Setup project instead of a Setup project. The latter installs files into the file system of a target computer; whereas, the former installs into the virtual directory of a Web server.

Categories