Can I set SSRS parameter defaults by solution configuration? - visual-studio-2012

When developing SSRS reports in Visual Studio, I use solution configurations (Debug/Release) to select whether the report will be deployed to a test server or to production. When developing the report, I set up default values for the report parameters so previewing can be done quickly, but these defaults should not be deployed to production, so at present I must remember to remove the default value from EVERY parameter before deploying when I switch to my "Release" configuration. (Or have to clean that up later within SSRS since redeploying does not modify parameter defaults).
I would hope there is some way to link the parameter defaults to the build configuration so that the step of manually removing all default values could be made unnecessary. Does Visual Studio have a way to do this?

Default parameters are only propagated to the server on the first deployment. Keep the defaults set in your development environment. Once the report is deployed, go to the report server, find the report, open the parameters and remove the defaults. These won't be overwritten by subsequent deployments of the report.

Related

Conditional proxy settings in gradle.properties

I use Android Studio and gradle in my office using a authenticated corporate proxy. This unfortunately means that I have to enter my proxy config including user/pass in cleartext in gradle.properties (or have it automatically propagated from Android Studio's preferences).
However, sometimes I work outside of the office, and I then have to manually go in and comment out my proxy settings each time, which is tedious.
Is there a way to make properties in a gradle file conditional so that the proxy configuration can be automatically activated by detecting if I'm on my corporate network or not? The condition itself could in turn be retrieved either by querying the network adapter for the current network, or perhaps better, by making a simple curl to a known host on my corporate network.
I'm using both Windows and Ubuntu clients but this question mostly applies to Windows.
There might be other ways to solve this I guess, perhaps changing the global gradle settings rather than the project specific ones. To be honest, I have to do a similar git config --add http.proxy, and the same for npm, bower and what not, everytime I change working environments. Other suggestions are welcome even though this question specifically asks how to create a gradle.properties which tries to connect to a known intranet host, and depending on the outcome sets or unsets properties.
I have had the same problem for a while. There was an additional problem for me that gradle.properties are checked in to our VCS with a proxy setting; and I had to take extra steps before all my commits to ignore the changes I did in that file. Additionally, I had to comment/uncomment the same piece of code multiple times in a day.
I could not come up with a conditional update system, but the second problem was resolved by inbuilt shelving functionality in Android Studio and creating changelists to keep 2 copies of the file with different settings.
I don't think there is any way to solve this problem the way you are asking for. For a simple reason: .properties files are not meant to have logic. To quote the Java docs:
Properties are configuration values managed as key/value pairs.
The dynamic settings can be achieved either via Android Studio proxy settings or writing a Gradle task that runs on project load, checks network conditions and sets system properties. I haven't tested this approach, but I think this will also update the gradle.properties file (a side-effect that you may not want). But what is being done by Gradle can also be done via a shell script that you need to execute on project load.
The way I am currently handling proxy update is by entering/saving the proxy settings in Android Studio itself, and toggling when I move between locations. It just takes a couple of commands to bring up the proxy dialog and enable/disable the saved proxy.
Since this proxy file is saved in idea.config.path/options/proxy.settings.xml, you could also try writing a shell script that can toggle the contents based on network availability.
This may not be what you were looking for, but I hope it clears up why it can't be done the way you asked for.

Visual Studio 2015 / MVC 5: Attach to Process: Cannot obtain value of the local variable

I can connect to the w3p process on my IIS box just fine. I can step through, although it seems to skip some areas. Also, when I try to view a variable value, I get:
Cannot obtain value of the local variable or argument because it is not available at this instruction pointer, possibly because it has been optimized away.
I've seen MANY answer on this subject, but they all are geared toward local debugging. I am attaching to the server and getting this.
I have the source code and am working from that project. Does it matter if I publish the app to the server with the config set to 'Release'?
ANSWER: I switched it to 'debug' when publishing and now I can see the variables. I previously thought it was how it was set in the project properties, but it's how it's published to the server that makes the difference when publishing.

SharePoint 2010 modify web.config file with http handlers

I am deploying a SharePoint 2010 web part that uses the microsoft .net charting tool to build charts. I need the chart handler added to the sharepoint web.configs automatically. I've been told that when you create the wsp the package can be told that when the program is installed it needs to modify the web.config to add these handlers.
I have seen a couple options out there:
-WebConfigModifications
-Safe controls
I don't know which, if any, that I should be using. I don't know for sure if this will be a first time installation for the application (we're moving sharepoint environments at the same time we are updating this. I think that it will be a first time installation on that new environment but can't be sure.)
And I definitely do not know how to implement this correctly. I would appreciate any advice.
Also it may be important to know that I do not have any privileges on the server. I can't even deploy myself.
For example, this seems like good info: http://platinumdogs.me/2009/07/08/using-the-mschart-controls-in-sharepoint-moss-2007/ Except that I can't just write to the webconfig and restart IIS. It has to be automated and not a direct edit to the file.
Thanks all!
I would recommend that you use a Feature Receiver attached to your WSP to create the appropriate SPWebConfigModification entries when your solution's features are activated. Likewise, the SPWebConfigModification entries should be removed when your solution's features are deactivated.
Step 1: Create a Feature Receiver
MSDN has an overview of how to add a Feature Receiver: http://msdn.microsoft.com/en-us/library/ee231604.aspx
Note you'll want to handle both the FeatureActivated and FeatureDeactivating events.
Step 2: Use Feature Receiver events to add or remove SPWebConfigModifications
In those two events, you'll need to programmatically add or remove one or more SPWebConfigModification entries. These affect SharePoint's web.config file, but unlike a manual edit of the config file, they are stored in SharePoint's content database. This means that if the web.config is reset for any reason (and it happens), SharePoint can and will reapply the modifications, thus preserving your changes.
MSDN has an overview of programmatically creating and removing SPWebConfigModifications: http://msdn.microsoft.com/en-us/library/office/bb861909(v=office.14).aspx
It is very important that the FeatureDeactivating event properly clean up all modifications made during FeatureActivated, or you will end up with a proliferation of duplicate config entries. This means you need to really understand how to use the Path and Name properties of the SPWebConfigModification.
This article gives a good overview of how Path and Name are combined to create an XPath expression pointing to the node to be added or removed: http://smindreau.wordpress.com/2013/06/12/finally-the-way-to-add-web-config-modifications-to-sharepoint/
Step 3: Test, test, TEST!
Lastly, test activating and deactivating your solution's feature in your local development environment to make sure everything is working properly. Note that the modifications will be applied via a timer job, so you may need to wait a minute or two to see the changes show up. Be sure the feature deactivation cleans up your modifications! (If you get into a mess in your development environment with duplicate modifications, you can always wipe the slate clean with a little PowerShell action.)

Deploying Report(.rdl) and DataSet and Data Source to SharePoint 2013 Integrated mode

I am searching for blog of MSFT article which speaks about publishing/deploying SSRS reports to DEV- QA - Acceptance - PROD SharePoint 2013 in Integrated mode.
Can someone advice if creating a feature/solution and packaging them for deployment is easy way or if there is another way to deploy this reports in the development lifecycle? with every environment(DEV, QA, UAT, PRod) the link within datasource changes which also needs to be dynamic, is it possible?
Within the project properties in SQL Server Data Tools/BIDS, you can define your various environments and enter the appropriate urls for data sources, reports, and server that environment in the deployment properties. Once these are set up, you can choose the correct configuration for the appropriate environment. Then when you click deploy, it will go to the correct location for that environment. Do not be fooled by the Configuration drop-down box on the properties page. You actually have to click the button to switch between configurations.
So change it here:
Not here:
For the data sources, make sure you are using shared data sources and that you set Overwrite data source in your project properties to false. Then update the data source to be appropriate to the environment and deploy it once in each environment. You won't have to do this in the future since it will now be out there. This means your SSRS data source must have the same name in each environment. If you change it in the future, you need to update it and redeploy in each SharePoint environment. Here's a blog post describing this approach.

MS Deploy - Team Build Drop

Does MS Deploy support the following scenario?
Create a package from a Team Build drop
Install the web application into IIS6/7 including app pools, settings, etc.
It doesn't seem to want to let me configure IIS on the destination server if my package wasn't created from IIS originally.
If you pass the parameter DeployOnBuild set to true, then your build will produce not only your normal web site files under _PublishedWebSites, but also one whose name ends with _Package. That will contain your package, the parameters file and the manifest, plus a .cmd file for deploying the package.
What it will not contain is anything you didn't tell MSBUILD to place into the package. In particular, no, it won't contain IIS settings unless you told MSBUILD to place IIS settings there. It won't get the settings from out of the air - it will only get them from your local IIS, and only if that's where you have your project set up.
The current feature set does not support this scenario - Microsoft

Resources