Can't write directive in svc file - iis

It could be a dumb question but I need the solution.
I would like to deploy my first REST web service in IIS by following this step : How to Host a Restful WCF Web Service
But I have a problem : I don't know how to write the directive in the svc file.
There are 3 files :
IService1.cs
Service1.svc
Service1.svc.cs
I double clicked the Service1.svc but I always get Service1.svc.cs
I can't find "View Designer" icon as I found in webform file.
I build the project using Visual Studio 2008 SP1
Would you please tell me what mistakes I did?
Thanks in advance,
Samuel

Right click on the svc file and select "View markup"

Related

Error when open new DNNModule template project in visual studio

I want create a module with DNNModule template but when create module template get this error.
The Web Application Project DNNModule7 is configured to use IIS. The
Web server 'http://dnndev.me/desktopmodules/DNNModule7' could not be
found
I search in internet and found a solution I run as administrator visual studio but in this way the DNNModule template option hide .
Please advice
Follow below steps to kicked off this error message:
Open IIS.
Create new website dnndev.me on IIS Server.
Folder of this website must be the path of your actual DNN website from where you are creating DNN modules.
Try to create modules using Chritoc's DNN template.
For more information about this error, check this URL.
Please let me know if you have any questions.

What is the minimum needed to setup MSDEPLOY ? Or will using file copy from VS work just as well ?

I am coming from years of XCOPY deployment so I am trying to make steps to make deploying to the various servers more efficient. When I have used hosted services like AZURE I know it would give me the information I need to put in the publish/webDeploy box to make everything just work.
I have a blank Windows server 2012 machine with IIS. What do I do to activate it so that I can deploy from my Visual Studio ? Where do I get the URL for MSDEPLOY from ?
And a related question.. Will using file copy option in Publish be just as good as MSDEPLOY for my basic requirements? All I want to be able to do in the end is select a Profile from VS and publish to the dev/test/prod machine and use XML transforms for the web.config.

How to install Contract-First Tool in VisualStudio 2012

I have VisualStudio 2012 and I'm trying to follow the following tutorial http://msdn.microsoft.com/en-us/library/hh674270.aspx
But I couldn't find the option Schema Definition from the WCF pane of the Templates dialog.
Do I have to install something? What would that be? An extension, perhaps?
Thanks in advance.
You don't need to install it - it's already there. What might be catching you out is that it's only available in the "WCF Service Library" template.
Once you then add a schema file as shown:
You then get an additional option on the project properties:
I want to add my findings.
I too wanted the Contract-First tool and didn't find the setting mentioned in the msdn link.
However I found out how to add it to any project type as I wanted my iis-hosted services to use contract first aswell.
What you do is to create a "WCF Service Library" as mentioned above.
Then open the csproj-file for the project in a text editor.
Then copy paste the entries that looks something like this into the other project-file
<FlavorProperties GUID="{3D9AD99F-2412-4246-B90B-4EAA41C64699}">
<WcfProjectProperties>
<AutoStart>True</AutoStart>
</WcfProjectProperties>
</FlavorProperties>
Also you need to change the guid:s in the target project to something like this:
<ProjectTypeGuids>{3D9AD99F-2412-4246-B90B-4EAA41C64699};{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
The FlavorProperties tag with its guids are from vs2012 update 3 so it may change in the future.
So with this hack you're able to deploy contract first services directly to the iis.
The question however is why it wasn't working like this out of the box in visual studio 2012
You don't need to add the XSD from the WCF pane, just take the XML Schema item from the Data pane.
If VS 2012 has the option "Enable XSD as type definition language" on, it will generate the types under the namespace of your solution + ".ContractTypes".
Check the output windows to see what the build process is doing with the XSDs.

How to change deploy server in visual studio 2010 for web part?

I have a web part that I have been deploying to Server A. I now have a new SharePoint environment I would like to deploy my web part to (Server B). How can I set the web part solution to deploy to Server B rather than Server A? I have done this before but cannot find the place to do it.
Thanks.
To Deploy from Visual studio, VS needs to be installed on the server you're deploying to. To change the site you're deploying to for development/debugging purposes is a property on the project file in VS.
Shane
To clarify select the project in solution explorer then edit the Site URL property in the Properties toolbox, do not right click and select properties.
In order to deploy to a remote SP application, I recommend using PowerShell scripts that are run on the remote server. That is what I did, and it works well. Much easier than stsadm.
Change the Site Url in Project Properties to deploy in desired server.
u can use stsadm command to deploy into new server

The type or namespace name 'Script' does not exist in the namespace 'System.Web'

I just deployed a website into IIS 7 (about which I am woefully ignorant), and upon trying to build the site, I receive this error. I did a little googleing and I saw an article that said I should put system.web.extensions.dll into the /bin. But, I also saw an article saying not to do that. I tried it anyway, but I just received a different error ('Resource cannot be found').
I am totally clueless as to what else to try
Can you use the "Publish" command in Visual Studio to publish directly to the site? If not, then use that command to publish to a similar site on your machine, then copy it to the customer site.
You should also look into the IIS Web Deployment Tool. It can copy an entire site, including IIS settings and any databases. It will be built into VS2010.
Go to control panel, then programs, turn windows features on or off, scroll down to Microsoft.net framework 3.5.1 expand, make sure both sub options are selected, this might help your issue.

Resources