I've created a WCF service in Sharepoint 2013 and it works great on our dev server. However, we now need to push it onto a production server and I can't seem to find any instructions on how to publish to another server.
I followed a tutorial very similar to this one:
http://www.robertseso.com/2013/05/adding-custom-wcf-services-to.html
In development, but it doesn't cover actual deployment. As per this (and other) tutorials, I deployed as a "farm" solution. If I go to "publish" in Visual Studio the option to "Pubish to SharePoint Site (Sandboxed solutions only)" is grayed out.
After a lot of searching around, I was able to piece together an answer. So in case anybody else encounters the same problem:
In Visual Studio, when you go to "Build" and "Publish..." you can "Publish to File System" (the Publish to SharePoint Site being grayed out as noted in the question). What this does is produce a .wsp file that is you packaged install file you need.
Transfer this file to your target SharePoint server and then open SharePoint Management Shell (as administrator). A list of available cmdlets can be found here:
http://technet.microsoft.com/en-us/library/ff678226%28v=office.15%29.aspx
I used:
Add-SPSolution -LiteralPath c:\<path to wsp file>\myservice.wsp
This adds the solution to Sharepoint but doesn't install it. To install you need:
Install-SPSolution -Identity myservice.wsp -GACDeployment
Note, however, that this will give you an error if the Sharepoint Administrator service isn't running (so check in services.msc first)
This add the installation job to a timer to be run at some point. You can check the status with:
GetSPSolution
Which will list all the solutions, or you can pass a name to if you want to only see the one you just installed. This will show you the "Deployed" status of the service. In my case, it was stuck of False and even after several minutes refused to do anything.
In my case, this problem was solved by going back into services and restarting both SharePoint Timer Service and SharePoint Adminstrator after which is magically showed deployed as True.
Related
I've been hitting my head against this wall for days now and to my knowledge I've followed every direction I've found. But I'm still getting a 500 Error when I browse to the URL.
What I've got to work with is a Windows Server 2012 R2 with IIS 8.5. I'm not married to IIS but I'd prefer not to dip into YET another tech just to get this running.
What I've done:
Old-style blazor-server app (with Program / Startup pair) without authentication. Dependencies:
SharpZipLib
LiteDB
published it using dotnet publish -o bin/publish --self-contained -r win7-x64
copied that folder to the server
On the server:
installed urlrewrite2
installed everything under Windows Features Word Wide Web Services and Web Management Tools
restarted
created a new site in IIS
set the application pool to unmanaged
set the physical path to the folder I copied from my dev system
What I haven't done:
Anything regarding Visual Studio as I'm currently forced to contend with Visual Studio Code and none of that applies/is possible here.
Provisional Workaround
running dotnet my.dll --urls http://*:1234 does work to expose the app to the network
the command needed to be run inside the application folder otherwise the app would fail to load the connection string.
I've also had to provision a production database and modify my appsettings.json accordingly
This is workable for now but not having the app "auto start" with the server is unsatisfactory.
I have been trying to browse a website run under IIS Express VS2019 from another computer on the same network. I see the following error.
Bad Request - Invalid Hostname
I found several discussions where people suggested adding bindings and I did try adding so many different bindings in applicationhost.config with specific hostname, IP, hostname+ip, wildcards. When I add any binding or modify the existing localhost binding VS 2019 start giving me the following error
Unable to connect to web server 'IIS Express'
I am running VS2019 as an admin. What else I am missing?
Here is what I discovered. I do not have admin privileges on my local PC. Our sysadmin had created a shortcut for me which launches VS2019 as an admin. However, the VS was still not run as elevated Admin privileges. Turns out, you need to be an admin, and you must right-click the VS2019 shortcut and choose Run As Administrator with a shield and say Yes to the warning. The shortcut wasn't doing none of that. Now my custom IIS Express bindings are picked up from applicationhost.config without any issue.
When I try to publish it I get the following error message:
Error 1 Web deployment task failed. (Could not connect to the remote computer ("..*.*"). On the remote computer, make sure that Web Deploy is installed and that the required process ("Web Management Service") is started. Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_DESTINATION_NOT_REACHABLE.)
I dont understand why is it referring me to a remote computer, I've specified the destination URL as my own IP address. And I have web management service checked on windows features.
How do I solve this particular error?
Try to publish to the file system, if this works move the files into you wwwroot, normally c:\inetpub\www.
then go to start and run inetmgr to open iis configuration manager, if you see your folder there right click and convert to application, accept settings then right click / manage / browse and you should see your site or an IIS error that should be easy to debug.
I never use the deploy to IIS feature from VS as it's pants.
Good luck!
We are running Visual Studio 2012 and Team Foundation Server 2012. In the Team Explorer window, I am able to successfully connect to our TFS environment. However, when I select the Security link under Team Project or Team Project Collection, I receive a message "Team Foundation Server: Login Failure: unknown user name or bad password".
I have not found a log file or anything in any event viewer file that helps debug this problem.
Is there a log file I can search for that contains some 'hints' as to want the connection problem is?
where are your credentials stored on your locale machine that are used to connection team foundation?
We realized that the root cause for this issue is that Visual Studio is trying to open a browser using the same credentials used to connect to TFS. If those credentials are not allowed to run processes on your machine (I suspect in your case it’s domain users on a different domain which is not trusted by the client domain) then opening the browser will fail. That explains why you can hit those URLs using a browser instance that is opened using your own credentials.This will be fixed in a future release of visual studio.
In TFS 2012, the management interface for permissions and project settings has largely shifted to Team Web Access.
Clicking any of the following settings from Team Explorer 2012 will produce the "Logon failure: unknown user name or bad password" error:
•Team Project Collection > Security
•Team Project Collection > Group Membership
•Team Project > Security
•Team Project > Group Membership
•Team Project > Work Item Areas
•Team Project > Work Item Iterations
•Team Project > Project Alerts
I have the same problem. To correct it (temporaly), you must run VS 2012 with this command:
C:\Windows\System32\runas.exe /netonly /user:{domain\loginname} "C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\devenv.exe"
Change {domain\loginname} by the domain and login name of your tfs domain account. A console will ask for your password and all works!
I also experienced the same issue with TFS. I found a solution for that. You have to remap your workspaces in your PC or Remote server. If you have any uncommitted changes in your projects, you have to keep backup, otherwise you will lost your changes.
Steps -
Go to Workspaces in Visual Studio
File-> Source Control -> Advanced -> Workspaces
Remove the current workspaces.
Remap the projects again.
I was experiencing the same issue with TFS Express 2012. I don't know if my situation applies to you but here are the facts:
My TFS instance was running on a remote server.
Neither that server or my local machine were on a domain.
I was using the same user account name on both machines but with
different passwords.
Setting the passwords to be same fixed the problem.
The functions that weren't working were the ones that launch the project website, which I could navigate to directly anyway.
Managed to fix the issue myself by mapping a drive to the area where TFS appears to have A cache located - but then I have 2 separate workspaces going across 2 separate domains
I have getting the above error when i try to start wcf service hosted in windows service. i am using net.tcp binding with port sharing and have updated the SMSSvcHost.exe.config with the correct SID. What else I could be missing which is casuing this error
i noticed on other forums people suggsting rebooting the server and running the service under admin account. don't know how relevant these suggestions are.
the issue was casued by installtion of .NET Framework 4.0. It upgared net.tcp port sharing as well.
I ran into the same issue. My solution is grant Administrative right to the application by adding app.manifest file and use this file in the project properties, manifest field. If I am running in Visual Studio, I need to run VS in administrative mode.
That is kind of sucks. I am wondering others have a different solution to this.
Running Visual Studio as Administrator worked for me